/* ===========================================
   GoTrip Live Tour Search — fully scoped
   Place at: public/css/tour-search.css
   =========================================== */

/* Trigger button */
button#gts-trigger {
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0;
    line-height: 0;
    display: flex;
    align-items: center;
    color: inherit;
    box-shadow: none !important;
    outline: none;
    opacity: 0.85;
    transition: opacity 0.15s;
}
button#gts-trigger:hover { opacity: 1; }
button#gts-trigger svg {
    display: block;
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0;
    font-size: 0 !important;
}

/* Overlay */
#gts-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 100px 16px 40px;
    pointer-events: all;
}
#gts-overlay[hidden] {
    display: none !important;
}

/* Backdrop */
#gts-backdrop {
    position: fixed;
    inset: 0;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    background: rgba(10, 14, 28, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: gts-fade 0.18s ease forwards;
}

/* Modal card */
#gts-modal {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 32px 80px rgba(0, 0, 0, 0.28),
        0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    animation: gts-drop 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Input row */
#gts-modal .gts-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid #f2f2f2;
    background: #ffffff;
}
#gts-modal .gts-input-icon {
    color: #c0c0c8;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

#gts-modal #gts-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 1rem;
    font-family: inherit;
    background: transparent !important;
    color: #1a1a2e;
    min-width: 0;
    padding: 0 !important;
    height: auto !important;
    border-radius: 0 !important;
}
#gts-modal #gts-input::placeholder { color: #c0c0c8; }
#gts-modal #gts-input::-webkit-search-cancel-button { display: none; }

#gts-modal .gts-shortcut {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: #c8c8d0;
    border: 1px solid #e8e8ee;
    border-radius: 5px;
    padding: 3px 7px;
    background: #fafafa;
    flex-shrink: 0;
    font-family: inherit;
    line-height: 1.4;
}

/* Status lines */
#gts-modal .gts-status {
    margin: 0;
    padding: 16px 22px;
    font-size: 0.85rem;
    color: #b0b0bc;
    text-align: center;
    background: #ffffff;
}
#gts-modal .gts-status[hidden] { display: none; }

/* Results list */
#gts-modal #gts-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 6px 0 10px !important;
    max-height: 420px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #ffffff;
}

#gts-modal #gts-list li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

#gts-modal #gts-list li a {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 11px 22px !important;
    text-decoration: none !important;
    color: #1a1a2e !important;
    transition: background 0.1s;
    outline: none;
    border-radius: 0 !important;
    background: transparent;
}
#gts-modal #gts-list li a:hover,
#gts-modal #gts-list li a[aria-selected="true"] {
    background: #f5f7ff !important;
    color: #1a1a2e !important;
}

/* Icon bubble */
#gts-modal .gts-icon-wrap {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: #eef0fb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #3554d1;
    transition: background 0.1s;
}
#gts-modal #gts-list li a:hover .gts-icon-wrap,
#gts-modal #gts-list li a[aria-selected="true"] .gts-icon-wrap {
    background: #dde2f8;
}

/* Result text */
#gts-modal .gts-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
#gts-modal .gts-meta {
    display: block;
    font-size: 0.78rem;
    color: #9898a8;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* Highlight — scoped so it doesn't touch GoTrip's homepage search */
#gts-modal mark {
    background: #fff0b3;
    color: #1a1a2e;
    border-radius: 2px;
    padding: 0 1px;
    font-style: normal;
    font-weight: inherit;
}

/* Divider between results */
#gts-modal #gts-list li + li a {
    border-top: 1px solid #f7f7f9;
}

/* Animations */
@keyframes gts-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes gts-drop {
    from { opacity: 0; transform: translateY(-14px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

/* Mobile */
@media (max-width: 640px) {
    #gts-overlay { padding: 0; align-items: flex-start; }
    #gts-modal   { border-radius: 0 0 16px 16px; }
}
.gts-mobile-icons {
    display: none;
}
@media (max-width: 1199px) {
    .gts-mobile-icons {
        display: flex !important;
        align-items: center;
    }
}