/* ============================================
   ADDRESS BOOK PAGE — Premium Redesign v2
   ============================================ */

/* ── Hero Add Button ── */
.addressbook-hero__add-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    background: rgba(0, 173, 181, 0.15);
    border: 1px solid rgba(0, 173, 181, 0.3);
    color: #00ADB5;
    border-radius: var(--radius-lg, 12px);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.addressbook-hero__add-btn:hover {
    background: #00ADB5;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 173, 181, 0.35);
}

/* ── Success Disclaimer ── */
.orders-disclaimer--success {
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    border: 1px solid #34D399;
    color: #065F46;
}

.orders-disclaimer--success .orders-disclaimer__icon {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

/* ── Address Card List ── */
.addressbook-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

/* ── Address Cards ── */
.acard {
    display: flex;
    background: var(--white, #fff);
    border: 1px solid var(--gray-200, #D5D5D5);
    border-radius: var(--radius-xl, 16px);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: ocard-slideUp 0.45s ease both;
}

.acard:hover {
    border-color: rgba(0, 173, 181, 0.35);
    box-shadow: 0 8px 24px rgba(34, 40, 49, 0.1), 0 2px 8px rgba(0, 173, 181, 0.08);
    transform: translateY(-2px);
}

.acard--default {
    border-color: rgba(0, 173, 181, 0.3);
    box-shadow: 0 2px 12px rgba(0, 173, 181, 0.08);
}

/* Left Indicator */
.acard__indicator {
    width: 5px;
    flex-shrink: 0;
    transition: width 0.2s ease;
}

.acard:hover .acard__indicator {
    width: 6px;
}

.acard__indicator--default {
    background: linear-gradient(180deg, #00ADB5, #009DA5);
}

.acard__indicator--normal {
    background: linear-gradient(180deg, #D5D5D5, #BDBDBD);
}

/* Content */
.acard__content {
    flex: 1;
    padding: 1.1rem 1.35rem;
    min-width: 0;
}

/* Top Row */
.acard__top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.acard__name-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.acard__type-icon {
    color: var(--primary, #00ADB5);
    font-size: 0.9rem;
}

.acard__label {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-800, #222831);
}

/* Default Badge */
.acard__default-badge,
.address-card__badge--default {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.acard__default-badge i,
.address-card__badge--default i {
    font-size: 0.6rem;
}

/* Details */
.acard__details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.acard__detail-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--gray-700, #393E46);
    line-height: 1.5;
}

.acard__detail-icon {
    color: var(--gray-400, #9E9E9E);
    font-size: 0.75rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.acard__address-text {
    line-height: 1.6;
}

/* Actions */
.acard__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100, #E8E8E8);
}

/* Delete Button */
.ocard__btn--delete {
    color: var(--gray-500, #757575);
    border: 1.5px solid var(--gray-200, #D5D5D5);
    background: transparent;
}

.ocard__btn--delete:hover {
    color: var(--danger, #DC2626);
    border-color: var(--danger, #DC2626);
    background: rgba(220, 38, 38, 0.04);
    text-decoration: none;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */

.addressbook-toast-wrapper {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    pointer-events: none;
}

.addressbook-toast {
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-lg, 12px);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    display: none;
    min-width: 280px;
    max-width: 400px;
    backdrop-filter: blur(8px);
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.addressbook-toast--visible {
    display: flex;
    transform: translateX(0);
    opacity: 1;
}

.addressbook-toast--success {
    background: rgba(232, 245, 233, 0.95);
    color: #2E7D32;
    border: 1px solid rgba(46, 125, 50, 0.15);
}

.addressbook-toast--error {
    background: rgba(255, 235, 238, 0.95);
    color: #C62828;
    border: 1px solid rgba(198, 40, 40, 0.15);
}

.addressbook-toast__icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.addressbook-toast__message {
    flex: 1;
}

.addressbook-toast__close {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    padding: 0.25rem;
    font-size: 0.85rem;
    line-height: 1;
    transition: opacity 0.2s;
}

.addressbook-toast__close:hover {
    opacity: 1;
}

/* ============================================
   CARD ANIMATIONS
   ============================================ */

.address-card--removing {
    animation: cardSlideOut 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes cardSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0);
        max-height: 300px;
        margin-bottom: 0.85rem;
    }
    50% {
        opacity: 0;
        transform: translateX(30px);
        max-height: 300px;
        margin-bottom: 0.85rem;
    }
    100% {
        opacity: 0;
        transform: translateX(30px);
        max-height: 0;
        margin-bottom: 0;
        padding: 0;
        border-width: 0;
        overflow: hidden;
    }
}

.address-card--highlight {
    animation: cardHighlight 1.2s ease;
}

@keyframes cardHighlight {
    0% { box-shadow: 0 0 0 0 rgba(0, 173, 181, 0.4); }
    30% { box-shadow: 0 0 0 6px rgba(0, 173, 181, 0.2); }
    100% { box-shadow: 0 2px 12px rgba(0, 173, 181, 0.08); }
}

/* ============================================
   ADDRESS FORM PAGE
   ============================================ */

.addressbook-form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

.addressbook-form-actions .account-submit {
    width: auto;
    padding: 0.75rem 2rem;
}

.addressbook-form-cancel {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--gray-600, #616161);
    border: 1px solid var(--gray-300, #BDBDBD);
    border-radius: var(--radius-lg, 12px);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.addressbook-form-cancel:hover {
    color: var(--gray-800, #222831);
    border-color: var(--gray-500, #757575);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .acard__content {
        padding: 0.9rem 1rem;
    }

    .acard__actions {
        flex-direction: column;
    }

    .acard__actions .ocard__btn {
        width: 100%;
        justify-content: center;
    }

    .addressbook-hero__add-btn {
        width: 100%;
        justify-content: center;
    }

    .addressbook-form-actions {
        flex-direction: column-reverse;
    }

    .addressbook-form-actions .account-submit,
    .addressbook-form-cancel {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .addressbook-toast-wrapper {
        top: auto;
        bottom: calc(var(--bottom-nav-height, 60px) + 1rem);
        right: 1rem;
        left: 1rem;
    }

    .addressbook-toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}
