/**
 * NF Address Lookup – frontend styles.
 *
 * BEM-adjacent naming under .nfal- prefix.
 * Designed to sit within a Ninja Forms HTML field without fighting NF styles.
 */

/* -----------------------------------------------------------------------
   Lookup wrapper
   ----------------------------------------------------------------------- */

.nfal-lookup {
    margin: 12px 0 20px;
    font-family: inherit;
}

/* -----------------------------------------------------------------------
   Buttons – base
   ----------------------------------------------------------------------- */

.nfal-find-address,
.nfal-manual-toggle,
.nfal-result-option {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #c7cdd8;
    background: #ffffff;
    color: #1f2937;
    padding: 9px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.nfal-find-address:focus,
.nfal-manual-toggle:focus,
.nfal-result-option:focus {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

.nfal-find-address:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* -----------------------------------------------------------------------
   Primary action button
   ----------------------------------------------------------------------- */

.nfal-find-address {
    background-color: #0f766e;
    border-color:     #0f766e;
    color:            #ffffff;
    font-weight:      600;
    margin-right:     8px;
}

.nfal-find-address:hover:not(:disabled) {
    background-color: #0d6b63;
    border-color:     #0d6b63;
}

/* -----------------------------------------------------------------------
   Secondary / toggle button
   ----------------------------------------------------------------------- */

.nfal-manual-toggle {
    margin-top: 8px;
    font-size:  13px;
    color:      #4b5563;
}

.nfal-manual-toggle:hover {
    background-color: #f3f4f6;
    border-color:     #9ca3af;
}

/* -----------------------------------------------------------------------
   Results container
   ----------------------------------------------------------------------- */

.nfal-results {
    margin-top: 10px;
    min-height: 0;
}

/* -----------------------------------------------------------------------
   Results list
   ----------------------------------------------------------------------- */

.nfal-results-list {
    list-style:    none;
    margin:        0;
    padding:       0;
    border:        1px solid #d1d5db;
    border-radius: 8px;
    overflow:      hidden;
    max-height:    320px;
    overflow-y:    auto;
    -webkit-overflow-scrolling: touch;
    /* Subtle drop shadow to lift the list off the form */
    box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.06 );
}

.nfal-results-list li + li {
    border-top: 1px solid #e5e7eb;
}

/* -----------------------------------------------------------------------
   Individual result option
   ----------------------------------------------------------------------- */

.nfal-result-option {
    display:       block;
    width:         100%;
    text-align:    left;
    border:        0;
    border-radius: 0;
    padding:       11px 14px;
    font-size:     14px;
    background:    #ffffff;
}

.nfal-result-option:hover,
.nfal-result-option:focus {
    background-color: #f0fdf4;
    color:            #0f766e;
    outline:          none;
}

/* -----------------------------------------------------------------------
   Status messages
   ----------------------------------------------------------------------- */

.nfal-message,
.nfal-selected {
    margin:        0;
    padding:       10px 13px;
    border-radius: 6px;
    font-size:     14px;
    line-height:   1.5;
}

.nfal-message {
    background: #f8fafc;
    color:      #374151;
    border:     1px solid #e5e7eb;
}

.nfal-message.nfal-error {
    background: #fef2f2;
    color:      #b91c1c;
    border:     1px solid #fecaca;
}

.nfal-selected {
    background: #f0fdf4;
    color:      #065f46;
    border:     1px solid #a7f3d0;
}
