
/* =========================================
   ANEKAM ASTRO - MY ADDRESSES
========================================= */

.my-addresses-page {
    min-height: 70vh;
    padding: 25px 20px 55px;
    background: #FFFCF5;
}

/* BACK LINK */

.addresses-back-container {
    width: min(100%, 1280px);
    margin: 0 auto;
}

.addresses-back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #08234C;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.addresses-back-link:hover {
    color: #C5A15A;
}

.addresses-back-link span {
    font-size: 22px;
}

/* PAGE HERO */

.addresses-hero {
    text-align: center;
    margin: -18px auto 42px;
}

.addresses-eyebrow {
    color: #C5A15A;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    margin: 0 0 8px;
}

.addresses-hero h1 {
    color: #08234C;
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
}

.addresses-ornament {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    color: #C5A15A;
    font-size: 19px;
    margin: 12px 0;
}

.addresses-ornament span {
    width: 55px;
    height: 1px;
    background: #C5A15A;
}

.addresses-hero > p:last-child {
    color: #77716A;
    font-size: 14px;
    margin: 0;
}

/* MAIN CONTENT */

.addresses-content {
    width: min(100%, 1150px);
    margin: 0 auto;
}

/* SECTION HEADING */

.addresses-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 27px;
}

.addresses-heading-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.addresses-heading-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: #FFF3DD;
    color: #A95C0C;
}

.addresses-heading-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.addresses-heading-title h2 {
    color: #08234C;
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.addresses-heading-title p {
    color: #888078;
    font-size: 11px;
    margin: 3px 0 0;
}

/* ADD ADDRESS BUTTON */

.add-address-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 52px;
    padding: 12px 24px;
    border: 1px solid #D85B00;
    border-radius: 12px;
    background: #E96A16;
    color: #FFFFFF;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(233, 106, 22, 0.15);
    transition: 0.2s ease;
}

.add-address-btn:hover {
    background: #C95408;
    transform: translateY(-2px);
}

.add-address-plus {
    font-size: 25px;
    font-weight: 300;
    line-height: 1;
}

/* ADDRESS LIST */

.addresses-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ADDRESS CARD */

.address-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 25px;
    min-height: 175px;
    padding: 22px 25px;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #E9DED0;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(8, 35, 76, 0.045);
    transition: 0.2s ease;
}

.address-card:hover {
    box-shadow: 0 9px 25px rgba(8, 35, 76, 0.08);
}

.address-card.is-default {
    background: linear-gradient(110deg, #FFF9EC, #FFFEFC);
    border: 1px solid #DDAA45;
}

/* ADDRESS ICON */

.address-card-icon {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #FFF1D3;
    color: #99500D;
}

.address-card-icon svg {
    width: 40px;
    height: 40px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ADDRESS DETAILS */

.address-card-details {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.address-card-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 5px;
}

.address-card-title {
    color: #08234C;
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    text-transform: capitalize;
}

.address-default-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #E9C16C;
    border-radius: 20px;
    background: #FFF0C9;
    color: #87500D;
    font-size: 10px;
    font-weight: 700;
}

.address-default-badge svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.address-customer-name {
    color: #17243A;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 5px;
}

.address-card-mobile,
.address-card-location {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #303B4C;
    font-size: 13px;
    line-height: 1.8;
    margin: 3px 0;
    overflow-wrap: anywhere;
}

.address-card-mobile svg,
.address-card-location svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin-top: 3px;
    color: #A95C0C;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ADDRESS ACTIONS */

.address-card-actions {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-left: auto;
    align-self: center;
}

.address-action-btn {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 16px;
    border: 1px solid #C9C5BF;
    border-radius: 10px;
    background: #FFFFFF;
    color: #08234C;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s ease;
}

.address-action-btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.address-edit-btn:hover {
    background: #08234C;
    border-color: #08234C;
    color: #FFFFFF;
}

.address-delete-btn {
    color: #B42318;
    border-color: #E99A91;
}

.address-delete-btn:hover {
    color: #FFFFFF;
    background: #B42318;
    border-color: #B42318;
}

.address-default-btn {
    color: #89500F;
    border-color: #D9A441;
    background: #FFFCF5;
}

.address-default-btn:hover {
    color: #FFFFFF;
    background: #A96816;
    border-color: #A96816;
}

/* ADDRESS TYPE */

.address-type-label {
    display: inline-block;
    padding: 4px 9px;
    margin-top: 7px;
    border-radius: 20px;
    background: #F3EFE7;
    color: #756347;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.7px;
}

/* LOADING */

.addresses-loading {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #77716A;
    font-size: 12px;
}

.address-spinner {
    width: 35px;
    height: 35px;
    border: 3px solid #EADFCB;
    border-top-color: #C5A15A;
    border-radius: 50%;
    animation: addressSpin 0.8s linear infinite;
}

@keyframes addressSpin {
    to {
        transform: rotate(360deg);
    }
}

.addresses-loading[hidden],
.addresses-error[hidden],
.addresses-empty[hidden] {
    display: none !important;
}

/* ERROR */

.addresses-error {
    padding: 25px;
    text-align: center;
    border: 1px solid #E9B5AE;
    border-radius: 12px;
    background: #FFF8F7;
    color: #A52A20;
    font-size: 13px;
}

.addresses-error button,
.addresses-empty button {
    margin-top: 12px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: #08234C;
    color: #FFFFFF;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

/* EMPTY STATE */

.addresses-empty {
    padding: 45px 20px;
    text-align: center;
    border: 1px dashed #DCC9A9;
    border-radius: 15px;
    background: #FFFEFC;
}

.addresses-empty-icon {
    color: #C5A15A;
    font-size: 45px;
}

.addresses-empty h3 {
    color: #08234C;
    font-family: 'Cormorant Garamond', serif;
    font-size: 25px;
    margin: 10px 0;
}

.addresses-empty p {
    color: #77716A;
    font-size: 12px;
}

/* FOOTER */

.addresses-footer {
    padding: 17px 15px;
    margin-top: 50px;
    text-align: center;
    background: #08234C;
    color: #FFFFFF;
}

.addresses-footer .footer-blessing {
    color: #E9C987;
    font-size: 13px;
    letter-spacing: 1px;
    margin: 0 0 8px;
}

.addresses-footer p:last-child {
    font-size: 11px;
    margin: 0;
    color: #E1E6EF;
}

/* RESPONSIVE */

@media (max-width: 900px) {

    .address-card {
        flex-wrap: wrap;
    }

    .address-card-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 107px;
    }

}

@media (max-width: 600px) {

    .my-addresses-page {
        padding: 20px 13px 35px;
    }

    .addresses-hero {
        margin: 15px auto 30px;
    }

    .addresses-hero h1 {
        font-size: 37px;
    }

    .addresses-hero > p:last-child {
        font-size: 11px;
        line-height: 1.7;
        padding: 0 8px;
    }

    .addresses-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .addresses-heading-title h2 {
        font-size: 24px;
    }

    .add-address-btn {
        width: 100%;
    }

    .address-card {
        gap: 14px;
        padding: 17px;
        border-radius: 13px;
    }

    .address-card-icon {
        width: 55px;
        height: 55px;
        flex-basis: 55px;
        border-radius: 12px;
    }

    .address-card-icon svg {
        width: 29px;
        height: 29px;
    }

    .address-card-details {
        flex-basis: calc(100% - 70px);
    }

    .address-card-title {
        font-size: 23px;
    }

    .address-customer-name {
        font-size: 13px;
    }

    .address-card-mobile,
    .address-card-location {
        font-size: 11px;
        line-height: 1.7;
    }

    .address-card-actions {
        margin-left: 0;
        gap: 8px;
    }

    .address-action-btn {
        min-height: 39px;
        padding: 8px 11px;
        font-size: 10px;
    }

    .addresses-footer {
        margin-top: 30px;
    }

}

/* =========================================
   ADD / EDIT ADDRESS MODAL
========================================= */

.address-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 12, 25, 0.72);
    backdrop-filter: blur(3px);
}

.address-modal-overlay[hidden] {
    display: none !important;
}

.address-modal {
    position: relative;
    width: min(100%, 760px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FFFEFC;
    border: 1px solid #D9AD57;
    border-radius: 21px;
    box-shadow: 0 20px 65px rgba(0, 0, 0, 0.25);
    animation: addressModalAppear 0.22s ease-out;
}

@keyframes addressModalAppear {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* MODAL HEADER */

.address-modal-header {
    position: relative;
    flex: 0 0 auto;
    padding: 25px 35px 18px;
    background: linear-gradient(110deg, #FFF8E9, #FFFEFC);
    border-bottom: 1px solid #F0E5D3;
}

.address-modal-close {
    position: absolute;
    top: 15px;
    right: 17px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E5DED3;
    border-radius: 50%;
    background: #FFFFFF;
    color: #08234C;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s ease;
}

.address-modal-close:hover {
    background: #08234C;
    color: #FFFFFF;
    border-color: #08234C;
}

.address-modal-heading {
    display: flex;
    align-items: center;
    gap: 22px;
}

.address-modal-icon {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #FFF0D0;
    color: #A95C0C;
}

.address-modal-icon svg {
    width: 39px;
    height: 39px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.address-modal-title-content {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding-right: 35px;
}

.address-modal-title-content > p:first-child {
    margin: 0 0 5px;
    color: #C08B32;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
}

.address-modal-title-content h2 {
    margin: 0;
    color: #08234C;
    font-family: 'Cormorant Garamond', serif;
    font-size: 35px;
    font-weight: 700;
    line-height: 1.1;
}

.address-modal-title-content .addresses-ornament {
    margin: 7px 0;
    font-size: 15px;
}

.address-modal-title-content .addresses-ornament span {
    width: 45px;
}

.address-modal-subtitle {
    color: #77716A;
    font-size: 11px;
    margin: 0;
}

/* MODAL BODY */

.address-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 20px 35px 17px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #D6BD8E #F7F2E9;
}

.address-modal-body::-webkit-scrollbar {
    width: 6px;
}

.address-modal-body::-webkit-scrollbar-track {
    background: #F7F2E9;
}

.address-modal-body::-webkit-scrollbar-thumb {
    background: #D6BD8E;
    border-radius: 10px;
}

/* FORM GRID */

.address-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
}

.address-form-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.address-form-field.full-width {
    grid-column: 1 / -1;
}

.address-form-field label,
.address-type-heading {
    color: #08234C;
    font-size: 12px;
    font-weight: 600;
}

.address-form-field label span,
.address-type-heading span {
    color: #D94732;
}

.address-form-field input {
    width: 100%;
    min-width: 0;
    height: 43px;
    padding: 0 13px;
    border: 1px solid #D5D0C9;
    border-radius: 8px;
    outline: none;
    background: #FFFFFF;
    color: #17243A;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    transition: 0.2s ease;
    box-sizing: border-box;
}

.address-form-field input::placeholder {
    color: #99938C;
}

.address-form-field input:focus {
    border-color: #C5A15A;
    box-shadow: 0 0 0 3px rgba(197, 161, 90, 0.12);
}

.address-form-field input.invalid {
    border-color: #D94732;
    background: #FFF9F8;
}

.address-field-error {
    min-height: 0;
    color: #C0392B;
    font-size: 10px;
}

.address-field-error:empty {
    display: none;
}

/* ADDRESS TYPE */

.address-type-section {
    margin-top: 15px;
}

.address-type-heading {
    display: block;
    margin-bottom: 9px;
}

.address-type-options {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.address-type-option {
    position: relative;
    min-width: 105px;
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid #D5D0C9;
    border-radius: 8px;
    background: #FFFFFF;
    color: #08234C;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.address-type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.address-type-option > span {
    color: #A95C0C;
    font-size: 16px;
}

.address-type-option.selected,
.address-type-option:has(input:checked) {
    border-color: #D69B36;
    background: #FFF5E1;
    color: #89500F;
}

.address-type-option:has(input:focus-visible) {
    outline: 2px solid #08234C;
    outline-offset: 2px;
}

/* DEFAULT ADDRESS CHECKBOX */

.address-default-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-top: 19px;
    cursor: pointer;
}

.address-default-checkbox > input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.address-checkbox-custom {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    border: 1.5px solid #BFC1C5;
    border-radius: 5px;
    background: #FFFFFF;
    position: relative;
    transition: 0.2s ease;
}

.address-default-checkbox input:checked + .address-checkbox-custom {
    background: #08234C;
    border-color: #08234C;
}

.address-default-checkbox input:checked + .address-checkbox-custom::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid #FFFFFF;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.address-default-checkbox input:focus-visible + .address-checkbox-custom {
    outline: 2px solid #C5A15A;
    outline-offset: 3px;
}

.address-default-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.address-default-text strong {
    color: #17243A;
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-weight: 700;
}

.address-default-text small {
    color: #77716A;
    font-size: 10px;
}

/* FORM MESSAGE */

.address-form-message {
    margin-top: 15px;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 11px;
}

.address-form-message[hidden] {
    display: none !important;
}

.address-form-message.error {
    border: 1px solid #E9B5AE;
    background: #FFF5F3;
    color: #A52A20;
}

.address-form-message.success {
    border: 1px solid #B8DCC1;
    background: #F1FAF3;
    color: #246B36;
}

/* MODAL FOOTER */

.address-modal-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 17px 27px;
    border-top: 1px solid #F0E5D3;
    background: linear-gradient(110deg, #FFF8E9, #FFFEFC);
}

.address-cancel-btn,
.address-save-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 25px;
    border-radius: 9px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.address-cancel-btn {
    border: 1px solid #08234C;
    background: transparent;
    color: #08234C;
}

.address-cancel-btn:hover {
    background: #08234C;
    color: #FFFFFF;
}

.address-save-btn {
    min-width: 190px;
    border: 1px solid #D85B00;
    background: #E96A16;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(233, 106, 22, 0.15);
}

.address-save-btn:hover {
    background: #C95408;
    border-color: #C95408;
}

.address-save-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* RESPONSIVE */

@media (max-width: 650px) {

    .address-modal-overlay {
        padding: 10px;
        align-items: center;
    }

    .address-modal {
        max-height: 94vh;
        border-radius: 15px;
    }

    .address-modal-header {
        padding: 20px 16px 15px;
    }

    .address-modal-heading {
        gap: 12px;
    }

    .address-modal-icon {
        width: 49px;
        height: 49px;
        flex-basis: 49px;
        border-radius: 11px;
    }

    .address-modal-icon svg {
        width: 28px;
        height: 28px;
    }

    .address-modal-title-content {
        padding-right: 15px;
    }

    .address-modal-title-content h2 {
        font-size: 26px;
    }

    .address-modal-subtitle {
        font-size: 9px;
        line-height: 1.6;
    }

    .address-modal-close {
        top: 9px;
        right: 9px;
        width: 29px;
        height: 29px;
        font-size: 21px;
    }

    .address-modal-body {
        padding: 17px 16px;
    }

    .address-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .address-form-field.full-width {
        grid-column: auto;
    }

    .address-form-field input {
        height: 42px;
        font-size: 11px;
    }

    .address-type-options {
        gap: 7px;
    }

    .address-type-option {
        flex: 1;
        min-width: 0;
        padding: 7px 9px;
        font-size: 10px;
    }

    .address-modal-footer {
        padding: 13px 16px;
    }

    .address-cancel-btn,
    .address-save-btn {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        font-size: 11px;
    }

}

