/* ── Address Management Styles ── */

.address-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.address-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

.address-section-title i {
    font-size: 18px;
    color: #7c3aed;
}

.btn-add-address {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}

.btn-add-address:hover {
    opacity: .88;
}


.address-card {
    border: 2px solid #ebebeb;
    border-radius: 12px;
    padding: 18px;
    background: #fff;
    transition: all .2s;
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.address-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 4px 14px rgba(124, 58, 237, .1);
}

.address-card.selected {
    border-color: #7c3aed;
    background: #faf5ff;
}

.address-card.selected::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: #7c3aed;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.address-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #7c3aed;
    margin-bottom: 8px;
}

.address-name {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
}

.address-text {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
}

.address-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    align-items: center;
}

.address-btn-edit,
.address-btn-delete {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.address-btn-edit {
    background: #f3f0ff;
    color: #7c3aed;
}

.address-btn-edit:hover {
    background: #ede9fe;
}

.address-btn-delete {
    background: #fef2f2;
    color: #dc2626;
}

.address-btn-delete:hover {
    background: #fee2e2;
}

.address-form-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.address-form-modal.active {
    display: flex;
}

.address-form-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}

.address-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.address-form-header h5 {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.address-form-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.address-form-close:hover {
    color: #111;
}

.address-form-body {
    padding: 20px 24px 24px;
}

.address-form-group {
    margin-bottom: 16px;
}

.address-form-label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    display: block;
}

.address-form-input {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.address-form-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .1);
    outline: none;
}

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

.address-form-row.full {
    grid-template-columns: 1fr;
}

.address-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.btn-address-cancel {
    flex: 1;
    padding: 11px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: background .2s;
}

.btn-address-cancel:hover {
    background: #f5f5f5;
}

.btn-address-save {
    flex: 1;
    padding: 11px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}

.btn-address-save:hover {
    opacity: .88;
}

.btn-address-save:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.address-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.address-success {
    color: #059669;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

/* ── Shared Modal Styles ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.modal-header h5 {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #111;
}

.modal-body {
    padding: 20px 24px 24px;
}
