/**
 * LPM Address Autocomplete — Phase 8
 * Dropdown suggestions + inline validation state styles
 */

/* ── Wrapper — needs position:relative so the dropdown sits below the field ── */
.lpm-address-wrapper {
    position: relative;
}

/* ── Suggestions dropdown ─────────────────────────────────────────────────── */
.lpm-suggestions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    border: 1px solid #c3c4c7;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    max-height: 260px;
    overflow-y: auto;
}

.lpm-suggestion-item {
    padding: 9px 14px;
    font-size: 13px;
    color: #1d2327;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f1;
    transition: background 0.1s;
}

.lpm-suggestion-item:last-child {
    border-bottom: none;
}

.lpm-suggestion-item:hover,
.lpm-suggestion-item:focus {
    background: #f0f6fc;
    outline: none;
}

/* ── Suggestions container (hidden by default; JS shows it) ──────────────── */
#lpm-wizard-address-suggestions,
#lpm-checkout-address-suggestions {
    display: none;
}

/* ── Validation feedback messages ────────────────────────────────────────── */
.lpm-address-error,
.lpm-address-warning {
    display: none; /* JS shows when needed */
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
}

.lpm-address-error {
    color: #7f1d1d;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.lpm-address-warning {
    color: #78350f;
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

/* ── Field-level validation borders ──────────────────────────────────────── */
.lpm-field-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15) !important;
}

.lpm-field-valid {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15) !important;
}

/* ── Disabled submit button state ────────────────────────────────────────── */
.lpm-save-address-btn:disabled,
.lpm-save-address-btn[aria-disabled="true"],
#lpm-place-order-btn:disabled,
#lpm-place-order-btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
