/* ──────────────────────────────────────────────────────────────────────────
   AirSync Aircraft Search / Compatibility
   Autocomplete search field + suggestions dropdown + details block.
   Scoped under .airsync-search so it can be dropped into any page/section.
   ────────────────────────────────────────────────────────────────────────── */

.airsync-search {
    --as-blue: #307FE2;
    --as-blue-dark: #1f6dd4;
    --as-ink: #0d1f3c;
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
    font-family: inherit;
}

.airsync-search *,
.airsync-search *::before,
.airsync-search *::after {
    box-sizing: border-box;
}

.airsync-search-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(13, 31, 60, 0.45);
    margin-bottom: 8px;
}

.airsync-search-field {
    position: relative;
    /* Ensure dropdown positioning is relative to this container and creates
       proper stacking context for z-index to work correctly */
    z-index: 1;
}

.airsync-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}

.airsync-search-input {
    width: 100%;
    padding: 16px 48px 16px 52px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--as-ink);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.airsync-search-input:focus {
    border-color: var(--as-blue);
    box-shadow: 0 0 0 3px rgba(48, 127, 226, 0.12);
}

.airsync-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
}

.airsync-search-clear:hover {
    color: var(--as-ink);
}

/* ── Suggestions dropdown ── */
.airsync-search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid rgba(48, 127, 226, 0.2);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 9999; /* High z-index to appear above all other content */
    overflow: hidden auto;
    max-height: 320px;
}

.airsync-suggestion {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s;
}

.airsync-suggestion:last-child {
    border-bottom: none;
}

.airsync-suggestion:hover,
.airsync-suggestion.is-active {
    background: #f0f6ff;
}

.airsync-suggestion-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(48, 127, 226, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--as-blue);
}

.airsync-suggestion-text {
    min-width: 0;
}

.airsync-suggestion-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--as-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.airsync-suggestion-sub {
    font-size: 12px;
    color: rgba(13, 31, 60, 0.45);
    margin-top: 1px;
}

.airsync-suggestion-empty,
.airsync-suggestion-loading {
    padding: 14px 18px;
    font-size: 14px;
    color: rgba(13, 31, 60, 0.45);
}

/* ── Details / result block ── */
.airsync-search-result {
    margin-top: 8px;
}

.airsync-result-card {
    margin-top: 20px;
    border-radius: 18px;
    overflow: hidden;
    border: 1.5px solid #cce0f7;
    box-shadow: 0 8px 32px rgba(48, 127, 226, 0.1);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.airsync-result-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.airsync-result-head {
    background: linear-gradient(135deg, var(--as-blue), var(--as-blue-dark));
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.airsync-result-head-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.airsync-result-eyebrow {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.airsync-result-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.airsync-result-body {
    background: #fff;
    padding: 20px 24px;
}

.airsync-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 8px;
}

.airsync-result-meta-item {
    flex: 1;
    min-width: 160px;
}

.airsync-result-meta-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(13, 31, 60, 0.4);
    margin: 0 0 2px;
}

.airsync-result-meta-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--as-ink);
    margin: 0;
}

.airsync-result-note {
    font-size: 14px;
    line-height: 1.6;
    color: #4a6080;
    margin: 8px 0 0;
}

.airsync-result-cta {
    background: #f8fafc;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.airsync-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.airsync-result-btn-primary {
    background: var(--as-blue);
    color: #fff;
}

.airsync-result-btn-primary:hover {
    background: var(--as-blue-dark);
    transform: translateY(-1px);
}

.airsync-result-btn-ghost {
    background: transparent;
    color: var(--as-blue);
    border: 1.5px solid var(--as-blue);
}

.airsync-result-btn-ghost:hover {
    background: rgba(48, 127, 226, 0.06);
}

@media (max-width: 600px) {
    .airsync-search-input {
        font-size: 16px; /* prevent iOS zoom on focus */
    }
}

