
.addresses-card { padding: 18px 20px; }
.addresses-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.addresses-title {
    margin: 0; font-size: 1.05rem; font-weight: 700;
    display: inline-flex; align-items: center; gap: 8px;
    letter-spacing: 0.2px; color: #111827;
}
.addresses-title .icon { width: 20px; height: 20px; color: var(--primary, #ef4444); }
.btn-add-address {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px; border: none; border-radius: 10px;
    background: var(--primary, #ef4444); color: #fff;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    box-shadow: 0 2px 8px rgba(239,68,68,0.18);
}
.btn-add-address:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239,68,68,0.28); }
.btn-add-address:active { transform: translateY(0); opacity: 0.92; }
.btn-add-address .icon-sm { width: 14px; height: 14px; }

.address-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px; background: #fff;
    border: 1px solid #e5e7eb; border-radius: 12px;
    margin-bottom: 10px;
    transition: box-shadow .15s ease, border-color .15s ease, transform .12s ease;
}
.address-item:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.06); }
.address-item.is-default {
    border-color: var(--primary, #ef4444);
    background: linear-gradient(135deg, rgba(239,68,68,0.04), transparent 60%);
    box-shadow: 0 4px 14px rgba(239,68,68,0.12);
}
.addr-icon {
    flex: 0 0 40px; width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; background: rgba(239,68,68,0.08);
    color: var(--primary, #ef4444);
}
.addr-icon svg { width: 22px; height: 22px; }
.addr-body { flex: 1; min-width: 0; }
.addr-label {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-weight: 700; font-size: 0.95rem; color: #111827; margin-bottom: 4px;
}
.badge-default {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--primary, #ef4444); color: #fff;
    padding: 3px 8px; border-radius: 6px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.3px;
}
.badge-default svg { width: 11px; height: 11px; }
.addr-line {
    color: #4b5563; font-size: 0.88rem; line-height: 1.4;
    word-break: break-word;
}
.addr-note {
    margin-top: 6px; display: inline-flex; align-items: center; gap: 5px;
    color: #6b7280; font-size: 0.78rem;
    background: #f9fafb; padding: 4px 8px; border-radius: 6px;
}
.addr-note svg { width: 12px; height: 12px; flex-shrink: 0; }
.addr-actions {
    display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
}
.addr-actions button {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: transparent; border-radius: 8px;
    color: #6b7280; cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .12s ease;
}
.addr-actions button:hover { background: rgba(0,0,0,0.04); color: #111827; }
.addr-actions button:active { transform: scale(0.94); }
.addr-actions .action-danger:hover { background: rgba(239,68,68,0.08); color: #ef4444; }
.addr-actions svg { width: 16px; height: 16px; }

.empty-state {
    text-align: center; padding: 30px 20px;
    color: #6b7280;
}
.empty-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 50%;
    background: #f3f4f6; color: #9ca3af; margin-bottom: 12px;
}
.empty-icon svg { width: 26px; height: 26px; }
.empty-text { font-weight: 600; color: #374151; font-size: 0.95rem; }
.empty-hint { font-size: 0.82rem; margin-top: 4px; color: #9ca3af; }

.address-modal { z-index: 100001 !important;
    position: fixed; inset: 0; z-index: 100001;
    display: none; align-items: center; justify-content: center;
}
.address-modal.active { display: flex; }
.address-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(15,23,42,0.55); backdrop-filter: blur(2px);
}
.address-modal-content {
    position: relative; background: #fff;
    width: 95%; max-width: 520px; max-height: 92vh;
    border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.address-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid #f1f5f9;
}
.address-modal-header h3 {
    margin: 0; font-size: 1.05rem; font-weight: 700; color: #111827;
}
.address-modal-close {
    background: #f3f4f6; border: none; border-radius: 50%;
    width: 32px; height: 32px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    color: #4b5563;
}
.address-modal-close:hover { background: #e5e7eb; }
.address-modal-close svg { width: 14px; height: 14px; }

.address-form { padding: 16px 18px; overflow-y: auto; flex: 1; }
.address-form .form-group { margin-bottom: 14px; }
.form-label {
    display: block; font-size: 0.82rem; font-weight: 600;
    color: #374151; margin-bottom: 6px; letter-spacing: 0.2px;
}
.form-input {
    width: 100%; padding: 10px 12px;
    border: 1px solid #e5e7eb; border-radius: 10px;
    font-size: 0.92rem; font-family: inherit; color: #111827;
    background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
    box-sizing: border-box;
}
.form-input:focus {
    outline: none; border-color: var(--primary, #ef4444);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}
textarea.form-input { resize: vertical; min-height: 70px; }

.label-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px; border: 1px solid #e5e7eb;
    border-radius: 10px; background: #fff; cursor: pointer;
    font-size: 0.85rem; font-weight: 600; color: #4b5563;
    transition: all .15s ease;
}
.chip svg { width: 16px; height: 16px; }
.chip:hover { border-color: #cbd5e1; }
.chip.active {
    border-color: var(--primary, #ef4444);
    background: rgba(239,68,68,0.08);
    color: var(--primary, #ef4444);
}

.form-row-actions {
    display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap;
}
.btn-map {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border: 1px solid #e5e7eb;
    border-radius: 10px; background: #fff; cursor: pointer;
    font-size: 0.83rem; font-weight: 600; color: #374151;
    transition: all .15s ease;
}
.btn-map:hover { border-color: var(--primary, #ef4444); color: var(--primary, #ef4444); }
.btn-map svg { width: 16px; height: 16px; }
.picked-hint {
    display: inline-flex; align-items: center; gap: 4px;
    color: #16a34a; font-size: 0.78rem; font-weight: 600;
}
.picked-hint svg { width: 14px; height: 14px; }

.check-row {
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; font-size: 0.88rem; color: #374151;
    margin-top: 6px;
}
.check-row input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }

.address-modal-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 14px 18px; border-top: 1px solid #f1f5f9;
    background: #fafafa;
}
.btn-ghost {
    padding: 10px 18px; border: 1px solid #e5e7eb; background: #fff;
    border-radius: 10px; font-weight: 600; cursor: pointer; color: #4b5563;
    transition: background .15s ease;
}
.btn-ghost:hover { background: #f9fafb; }
.btn-primary {
    padding: 10px 22px; border: none; background: var(--primary, #ef4444); color: #fff;
    border-radius: 10px; font-weight: 700; cursor: pointer;
    box-shadow: 0 2px 8px rgba(239,68,68,0.22);
    transition: transform .12s ease, box-shadow .15s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(239,68,68,0.32); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

@media (max-width: 480px) {
    .addresses-card { padding: 14px; }
    .addr-actions { flex-direction: row; }
    .addr-actions button { width: 40px; height: 40px; }
    .address-modal-content { max-width: 100%; max-height: 100vh; border-radius: 16px 16px 0 0; align-self: flex-end; }
    .address-modal { z-index: 100001 !important; align-items: flex-end; }
    .label-chips .chip { flex: 1; justify-content: center; }
}

.saved-addresses-list {
    display: flex; flex-direction: column; gap: 8px;
    max-height: 240px; overflow-y: auto;
    padding: 4px; margin: 0 -4px;
}
.saved-addr-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border: 2px solid #e5e7eb;
    border-radius: 12px; cursor: pointer;
    background: #fff; transition: all .15s ease;
}
.saved-addr-item input[type="radio"] { display: none; }
.saved-addr-item:hover { border-color: #cbd5e1; }
.saved-addr-item.selected {
    border-color: var(--primary, #ef4444);
    background: rgba(239,68,68,0.04);
    box-shadow: 0 2px 8px rgba(239,68,68,0.08);
}
.saved-addr-icon {
    flex: 0 0 32px; width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; background: rgba(239,68,68,0.08);
    color: var(--primary, #ef4444);
}
.saved-addr-icon svg { width: 18px; height: 18px; }
.saved-addr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.saved-addr-label {
    font-weight: 700; color: #111827; font-size: 0.88rem;
    display: flex; align-items: center; gap: 6px;
}
.saved-addr-badge {
    background: var(--primary, #ef4444); color: #fff;
    padding: 2px 6px; border-radius: 4px;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.3px;
}
.saved-addr-line { color: #4b5563; font-size: 0.78rem; line-height: 1.35; }
.saved-addr-new {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px; border: 2px dashed #cbd5e1;
    border-radius: 12px; background: #fff; cursor: pointer;
    font-size: 0.85rem; font-weight: 600; color: #6b7280;
    transition: all .15s ease;
}
.saved-addr-new:hover { border-color: var(--primary, #ef4444); color: var(--primary, #ef4444); }
.saved-addr-new svg { width: 16px; height: 16px; }

.saved-addr-actions { display: inline-flex; gap: 4px; margin-left: 6px; flex-shrink: 0; }
.saved-addr-action {
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: transparent; border-radius: 6px;
    color: #64748b; cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .12s ease;
}
.saved-addr-action:hover { background: rgba(0,0,0,0.05); color: #111827; }
.saved-addr-action.danger:hover { background: rgba(239,68,68,0.08); color: #ef4444; }
.saved-addr-action svg { width: 14px; height: 14px; }
.saved-addr-action:active { transform: scale(0.94); }

.pac-container { z-index: 100003 !important; }

.btn-map-cta {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 16px 20px;
    border: 2px solid var(--primary, #ef4444);
    border-radius: 12px; background: var(--primary, #ef4444); color: #fff;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: all .15s ease;
    box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}
.btn-map-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(239,68,68,0.35); }
.btn-map-cta:active { transform: translateY(0); }
.btn-map-cta svg { width: 22px; height: 22px; }
#address-loc-actions-group { margin-bottom: 14px; }
#address-skip-wrap { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }

.btn-manual-toggle {
    display: block; width: 100%; margin: 10px 0 0;
    padding: 14px 20px;
    border: 1.5px solid #cbd5e1; border-radius: 12px;
    background: #fff; color: #4b5563;
    font-size: 0.95rem; font-weight: 600; cursor: pointer;
    transition: all .15s ease;
    box-sizing: border-box;
}
.btn-manual-toggle:hover { border-color: #6b7280; color: #111827; background: #f9fafb; }
.btn-manual-toggle:active { transform: scale(0.98); }

.saved-addr-limit {
    text-align: center; padding: 12px;
    background: #fef2f2; border: 1px dashed #fca5a5;
    border-radius: 10px; color: #b91c1c;
    font-size: 0.82rem; font-weight: 600;
}

.address-map-info {
    display: flex; align-items: flex-start; gap: 10px;
    margin-bottom: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(59,130,246,0.04));
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 10px;
    color: #1e3a8a;
    font-size: 0.83rem; line-height: 1.45; font-weight: 500;
}
.address-map-info svg { flex-shrink: 0; width: 18px; height: 18px; color: #2563eb; margin-top: 1px; }

.addr-confirm-overlay {
    position: fixed; inset: 0; z-index: 100005;
    background: rgba(15,23,42,0.6); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    animation: addrFadeIn .15s ease-out;
}
@keyframes addrFadeIn { from { opacity: 0; } to { opacity: 1; } }
.addr-confirm-modal {
    background: #fff; border-radius: 16px;
    width: 92%; max-width: 380px;
    padding: 24px 22px 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    animation: addrSlideIn .2s ease-out;
}
@keyframes addrSlideIn { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.addr-confirm-icon {
    width: 56px; height: 56px; margin: 0 auto 14px;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(59,130,246,0.12); color: #2563eb;
}
.addr-confirm-icon.danger { background: rgba(239,68,68,0.12); color: #dc2626; }
.addr-confirm-icon svg { width: 28px; height: 28px; }
.addr-confirm-title {
    font-size: 1.05rem; font-weight: 700; color: #111827; margin-bottom: 6px; letter-spacing: 0.2px;
}
.addr-confirm-message {
    font-size: 0.9rem; color: #4b5563; line-height: 1.45; margin-bottom: 18px;
}
.addr-confirm-actions { display: flex; gap: 10px; }
.addr-confirm-cancel, .addr-confirm-ok {
    flex: 1; padding: 11px 16px;
    border-radius: 10px; font-weight: 600; cursor: pointer;
    font-size: 0.9rem; transition: all .15s ease;
    border: 1px solid transparent;
}
.addr-confirm-cancel { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.addr-confirm-cancel:hover { background: #e5e7eb; }
.addr-confirm-ok { background: var(--primary, #ef4444); color: #fff; box-shadow: 0 2px 8px rgba(239,68,68,0.22); }
.addr-confirm-ok:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239,68,68,0.32); }
.addr-confirm-ok.danger { background: #dc2626; box-shadow: 0 2px 8px rgba(220,38,38,0.25); }
.addr-confirm-ok.danger:hover { background: #b91c1c; box-shadow: 0 4px 12px rgba(220,38,38,0.35); }
