/* LIONSDU – Checkout address pop-up form (self-contained; works with or without lux.css) */
.lx-addr-overlay {
    --lx-accent: #ff0054;
    --lx-accent-soft: #fff0f5;
}

.addlink.hidden,
.lx-addr-overlay.hidden {
    display: none !important;
}

.addlink.lx-addr-overlay:not(.hidden) {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(10, 10, 14, .62) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow-y: auto;
    animation: lxFadeIn .22s ease both;
}

.lx-addr-overlay .uploadsec4.lx-addr {
    position: relative;
    width: 100% !important;
    max-width: 760px;
    max-height: calc(100vh - 48px);
    height: auto !important;
    margin: auto;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    background: #fff !important;
    border-radius: 22px !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .06);
    overflow: hidden !important;
    font-family: 'Poppins', system-ui, sans-serif;
    animation: lxPopIn .28s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes lxFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lxPopIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.lx-addr-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid #eef0f3;
    background: linear-gradient(180deg, #fff, #fcfcfd);
    flex-shrink: 0;
}

.lx-addr-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--lx-accent);
    background: var(--lx-accent-soft, rgba(255, 0, 84, .08));
    font-size: 18px;
}

.lx-addr-titles { flex: 1; min-width: 0; }

.lx-addr-head h2#mname {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 700;
    color: #111;
    line-height: 1.25;
    text-align: left !important;
}

.lx-addr-head p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.lx-addr-overlay .af-close {
    position: static !important;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f3f4f6;
    color: #374151 !important;
    font-size: 16px !important;
    cursor: pointer;
    transition: background-color .2s, color .2s, transform .2s;
}

.lx-addr-overlay .af-close:hover {
    background: #111;
    color: #fff !important;
    transform: rotate(90deg);
}

.lx-addr #addlinkform {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.lx-addr .lx-addr-body {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px !important;
    padding: 8px 24px 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    flex-direction: initial !important;
}

.lx-addr-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-content: start;
}

.lx-addr-gtitle {
    grid-column: 1 / -1;
    margin-top: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lx-addr-gtitle i { color: var(--lx-accent); font-size: 13px; }

.lx-addr .lx-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.lx-addr .lx-field.lx-full { grid-column: 1 / -1; }

.lx-addr .lx-field label {
    font-family: inherit !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #4b5563;
}

.lx-addr .lx-req { color: var(--lx-accent); }
.lx-addr .lx-opt { color: #9ca3af; font-weight: 500; }

.lx-addr .lx-field input,
.lx-addr .lx-field select {
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 !important;
    height: 46px;
    padding: 0 14px !important;
    font-size: 15px !important;
    font-family: inherit;
    color: #111;
    background-color: #f9fafb !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 12px !important;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
    -webkit-appearance: none;
    appearance: none;
}

.lx-addr .lx-field select {
    padding-right: 38px !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
}

.lx-addr .lx-field input::placeholder { color: #9ca3af; }

.lx-addr .lx-field input:hover,
.lx-addr .lx-field select:hover { border-color: #d1d5db !important; }

.lx-addr .lx-field input:focus,
.lx-addr .lx-field select:focus {
    background-color: #fff !important;
    border-color: var(--lx-accent) !important;
    box-shadow: 0 0 0 4px rgba(255, 0, 84, .12);
}

.lx-addr-foot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid #eef0f3;
    background: #fff;
    flex-shrink: 0;
}

.lx-addr-foot .addqbtn,
.lx-addr-foot .deletebtn {
    margin: 0 !important;
    height: 48px;
    padding: 0 28px !important;
    font-size: 15px !important;
    font-weight: 600;
    font-family: inherit;
    border-radius: 12px !important;
    width: auto !important;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, filter .2s;
}

.lx-addr-foot .addqbtn {
    min-width: 170px;
    background: var(--lx-accent) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(255, 0, 84, .28);
}

.lx-addr-foot .deletebtn {
    background: #fff !important;
    color: #dc2626 !important;
    border: 1.5px solid #fecaca !important;
    text-transform: capitalize;
}

.lx-addr-foot .deletebtn.hidden { display: none !important; }

.lx-addr-foot .addqbtn:hover,
.lx-addr-foot .deletebtn:hover { transform: translateY(-1px); filter: brightness(1.05); }

.lx-addr-foot .addqbtn:active,
.lx-addr-foot .deletebtn:active { transform: translateY(0); }

.lx-addr #message3:empty { display: none; }
.lx-addr #message3 { padding: 0 24px 14px; font-size: 14px; }

/* Mobile: bottom sheet */
@media (max-width: 767px) {
    .addlink.lx-addr-overlay:not(.hidden) {
        align-items: flex-end;
        padding: 0;
    }

    .lx-addr-overlay .uploadsec4.lx-addr {
        max-width: 100%;
        max-height: 94vh;
        max-height: 94dvh;
        border-radius: 22px 22px 0 0 !important;
        animation: lxSheetUp .3s cubic-bezier(.2, .8, .2, 1) both;
    }

    @keyframes lxSheetUp { from { transform: translateY(100%); } to { transform: none; } }

    .lx-addr-head { padding: 16px 16px 14px; position: relative; }
    .lx-addr-head::before {
        content: "";
        position: absolute;
        top: 6px;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        border-radius: 4px;
        background: #e5e7eb;
    }
    .lx-addr-icon { width: 40px; height: 40px; border-radius: 12px; font-size: 16px; }
    .lx-addr-head h2#mname { font-size: 18px !important; }

    .lx-addr .lx-addr-body {
        grid-template-columns: 1fr;
        padding: 4px 16px 18px;
    }

    .lx-addr-group { gap: 10px; }

    .lx-addr-foot {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    }

    .lx-addr-foot .addqbtn { flex: 1; }
    .lx-addr-foot .deletebtn { padding: 0 18px !important; }
}

@media (max-width: 360px) {
    .lx-addr-group { grid-template-columns: 1fr; }
}
.lx-addr .lx-field label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
