/* One card, with a clear existing-customer route above the purchase details. */
#unlockPanelSlot { margin: 8px 0 10px; }

#unlockControls,
#unlockControls *,
#unlockControls *::before { box-sizing: border-box; }

#unlockControls {
    position: relative;
    width: 100%;
    margin: 0;
    border: 1px solid #c4cbd0;
    border-radius: 6px;
    background: #fff;
    color: #151b24;
    box-shadow: 0 1px 3px #0003;
    font: 400 14px/1.35 Arial, Helvetica, sans-serif;
}

#unlockControls .unlock-panel-login {
    padding: 11px;
    border-bottom: 1px solid #bdc8d0;
    border-radius: 5px 5px 0 0;
    background: #eaf4fc;
}

#unlockControls .unlock-panel-login-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 28px;
    margin: 0 0 4px;
    color: #18254e;
    font: 700 14px/1.25 Arial, Helvetica, sans-serif;
}

#unlockControls .unlock-panel-login-row span { min-width: 0; }

#unlockControls .unlock-panel-account-icon,
#unlockControls .unlock-panel-padlock {
    display: block;
    flex: 0 0 26px;
    width: 26px;
    height: 30px;
    margin: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

#unlockControls #unlockPanelLogin,
#unlockControls #submitUnlockCode,
#unlockControls #buyItNow a {
    display: flex;
    align-items: center;
    justify-content: center;
    float: none;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 38px;
    margin: 0;
    padding: 8px 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    box-shadow: none;
    color: #fff;
    font: 700 16px/20px Arial, Helvetica, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

#unlockControls #unlockPanelLogin {
    min-height: 40px;
    background: #456fb0;
    font-size: 20px;
    line-height: 22px;
}

#unlockControls #unlockPanelLogin:hover,
#unlockControls #submitUnlockCode:hover { background: #31558f; }

#unlockControls #unlockPanelHeading {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 30px;
    height: auto;
    margin: 0;
    padding: 6px 11px 3px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #151b24;
    box-shadow: none;
    font: 700 19px/1.2 Arial, Helvetica, sans-serif;
    letter-spacing: -.25px;
    text-align: left;
    cursor: default;
}

#unlockControls .unlock-panel-padlock { color: #b89642; }
#unlockControls #unlockPanelHeading span { min-width: 0; }

#unlockControls #buyButtonBox {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0 11px 11px;
    border: 0;
    border-radius: 0 0 5px 5px;
    background: #fff;
    box-shadow: none;
    text-align: left;
}

#unlockControls .unlock-panel-price-row { margin: 0; padding: 0; }
#unlockControls .unlock-panel-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 7px;
    line-height: 1.1;
}

#unlockControls #unlockPanelPrice {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -.8px;
    white-space: nowrap;
}

#unlockControls .unlock-panel-vat {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
}

#unlockControls .unlock-panel-duration {
    margin: 0;
    color: #424a54;
    font-size: 18px;
    line-height: 20px;
}

#unlockControls .unlock-panel-benefits {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    margin: 2px 0 7px;
    padding: 8px 0 0;
    border-top: 1px solid #d9dee2;
    list-style: none;
    text-align: left;
}

#unlockControls .unlock-panel-benefits li {
    position: relative;
    min-height: 17px;
    margin: 0;
    padding: 0 0 0 23px;
    font: 400 13px/17px Arial, Helvetica, sans-serif;
}

#unlockControls .unlock-panel-benefits li::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 2px;
    width: 13px;
    height: 8px;
    border-left: 3px solid #56943b;
    border-bottom: 3px solid #56943b;
    transform: rotate(-45deg);
}

#unlockControls .unlock-panel-purchase-row { margin: 0; padding: 0; }
#unlockControls #buyItNow { width: 100%; margin: 0; }
#unlockControls #buyItNow a { background: #65943b; }
#unlockControls #buyItNow a:hover { background: #4c7529; }

#unlockControls #unlockPanelLoginArea {
    margin: 0;
    padding: 0;
    border: 0;
}

#unlockControls .unlock-panel-email-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
}

#unlockControls #unlockBox .unlock-panel-email-row label {
    flex: 1 1 auto;
    width: auto;
    margin: 0;
}

#unlockControls #unlockPanelLoginClose {
    display: block;
    flex: 0 0 auto;
    float: none;
    width: auto;
    min-height: 24px;
    height: auto;
    margin: 0;
    padding: 2px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    box-shadow: none;
    color: #31558f;
    font: 400 13px/20px Arial, Helvetica, sans-serif;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

#unlockControls #unlockPanelLoginClose:hover { color: #18254e; background: #dcebf8; }

/* Keep the existing login controls and their callbacks in both docking modes. */
#unlockControls #unlockBox {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
}

#unlockControls #unlockBox label {
    display: block;
    float: none;
    width: 100%;
    margin: 0 0 5px;
    padding: 0;
    color: #253952;
    font: 600 13px/18px Arial, Helvetica, sans-serif;
    text-align: left;
}

#unlockControls #unlockMap {
    display: block;
    float: none;
    width: 100%;
    min-width: 0;
    height: 34px;
    margin: 0;
    padding: 6px 8px;
    border: 1px solid #91a8bf;
    border-radius: 3px;
    background: #fff;
    box-shadow: none;
    color: #222;
    font: 400 14px/20px Arial, Helvetica, sans-serif;
}

#unlockControls #unlockMap:focus {
    border-color: #456fb0;
    outline: 2px solid #456fb0;
    outline-offset: 1px;
}

#unlockControls #submitUnlockCode {
    min-height: 40px;
    margin: 7px 0 0;
    padding: 6px;
    background: #456fb0;
    font-size: 16px;
}

#unlockControls button:focus-visible,
#unlockControls a:focus-visible {
    outline: 2px solid #294d81;
    outline-offset: 2px;
}

#topStatusBar { display: flex; flex-wrap: wrap; }
#topStatusBar[hidden],
#unlockPanelLogin[hidden],
#unlockPanelLoginArea[hidden] { display: none !important; }

/* Sidebar visibility still owns docking; narrow windows do not float the card. */
#unlockControls.unlock-panel-floating {
    position: fixed;
    top: calc(var(--map-toolbar-bottom, 55px) + 8px);
    right: 12px;
    z-index: 1100;
    width: min(var(--unlock-panel-width, 240px), calc(100vw - 24px));
    max-height: max(80px, calc(100dvh - var(--map-toolbar-bottom, 55px) - var(--map-footer-height, 22px) - 16px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}
