/* ============================================================
   GameSense UI polish (app.css) — DROP-IN
   ============================================================ */

/* Brand badge */
.gs-brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #10b981);
    box-shadow: 0 10px 25px rgba(37, 99, 235, .2);
}

/* Navbar layout polish (prevents weird wrapping/overflows) */
.navbar-brand {
    flex: 0 0 auto;
    white-space: nowrap;
}

.navbar-menu {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
}

.gs-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

/* Global search row styling */
.gs-search {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Thumbs and meta */
.gs-game-thumb {
    aspect-ratio: 16/10;
    object-fit: cover;
    background: #f3f4f6;
}

.gs-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Player */
.gs-player {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
    box-shadow: var(--shadow);
}

.gs-player iframe {
    width: 100%;
    height: 560px;
    border: 0;
    display: block;
}

@media(max-width:900px) {
    .gs-player iframe {
        height: 420px
    }
}

@media(max-width:520px) {
    .gs-player iframe {
        height: 360px
    }
}

/* Footer */
.gs-footer {
    padding: 28px 0;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, .7);
}

html[data-theme="dark"] .gs-footer {
    background: rgba(15, 23, 42, .55);
}

/* Empty state */
.gs-empty {
    padding: 30px;
    text-align: center;
}

/* Favorites */
.gs-fav-btn[data-active="1"] {
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .3);
}

.gs-fav-btn[data-active="1"] span {
    color: #ef4444;
}

/* small badge */
.gs-badge {
    font-weight: 800;
}

/* -------------------------------------------------
   Bulma-lite fallback: Columns/Grid (FIX sidebar below issue)
------------------------------------------------- */
.columns {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.column {
    padding: 0.75rem;
    flex: 1 1 0;
    min-width: 0;
    /* prevents overflow pushing layout */
}

/* Width helpers used in your templates */
.column.is-8 {
    flex: none;
    width: 66.6667%;
}

.column.is-4 {
    flex: none;
    width: 33.3333%;
}

.column.is-narrow {
    flex: none;
    width: auto;
}

/* spacing helper */
.columns.is-variable {
    --col-gap: 1.5rem;
}

.columns.is-variable>.column {
    padding: calc(var(--col-gap) / 2);
}

.columns.is-variable {
    margin-left: calc(var(--col-gap) / -2);
    margin-right: calc(var(--col-gap) / -2);
}

/* Mobile: stack */
@media (max-width: 1023px) {

    .column.is-8,
    .column.is-4 {
        width: 100%;
    }

    .gs-sticky {
        position: static !important;
        top: auto !important;
    }
}

/* Theme toggle button */
.gs-theme-btn {
    padding: 10px 12px;
}

.gs-theme-ico {
    font-size: 1rem;
    line-height: 1;
}

/* -------------------------------------------------
   Search autosuggest dropdown (NEW CLASS: .gs-suggest-list)
   IMPORTANT:
   - form has class "gs-suggest"
   - dropdown must NOT share same class (was breaking home)
------------------------------------------------- */
.gs-suggest-wrap {
    position: relative;
    min-width: 0;
    flex: 1 1 auto;
}

/* dropdown list */
.gs-suggest-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 70;

    /* hidden by default (JS adds .is-open) */
    display: none;
}

.gs-suggest-list.is-open {
    display: block;
}

.gs-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text);
}

.gs-suggest-item:hover,
.gs-suggest-item.is-active {
    background: rgba(37, 99, 235, .08);
}

.gs-suggest-thumb {
    width: 42px;
    height: 32px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(0, 0, 0, .06);
    flex: 0 0 auto;
}

html[data-theme="dark"] .gs-suggest-thumb {
    background: rgba(255, 255, 255, .06);
}

.gs-suggest-main {
    min-width: 0;
}

.gs-suggest-name {
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-suggest-meta {
    font-size: .85rem;
    color: var(--muted);
    margin-top: 1px;
}

.gs-suggest-empty {
    padding: 12px;
    color: var(--muted);
}

/* -------------------------------------------------
   Dropdown spacing on wrap (mobile)
------------------------------------------------- */
@media(max-width:900px) {
    .gs-dropmenu {
        position: static;
        display: none;
        margin-top: 8px;
    }

    .gs-dropdown.is-open .gs-dropmenu {
        display: block;
    }
}