/* GLOBAL AUTO-SEARCH dropdown grid (wwwroot/js/search-autocomplete.js) */
.gs-panel {
    position: fixed;
    z-index: 1060;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
    max-height: 72vh;
    overflow-y: auto;
    font-size: 14px;
    color: #222;
}
.gs-panel[hidden] { display: none; }

.gs-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.gs-count { font-weight: 400; color: #777; font-size: 13px; }

.gs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    padding: 12px;
}

.gs-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.gs-item:hover,
.gs-item.active {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .10);
    color: inherit;
}

.gs-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    background: #fafafa;
    border-radius: 4px;
    overflow: hidden;
}
.gs-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gs-img.gs-noimg::after {
    content: "No image";
    color: #aaa;
    font-size: 12px;
}

.gs-title {
    font-size: 13px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.gs-title mark { background: #fff3b0; padding: 0; color: inherit; }

.gs-all {
    display: block;
    text-align: center;
    padding: 11px;
    border-top: 1px solid #eee;
    font-weight: 600;
    text-decoration: none;
    position: sticky;
    bottom: 0;
    background: #fff;
}
.gs-all:hover { background: #f6f6f6; }

.gs-status { padding: 16px 14px; color: #555; }
.gs-switch { display: block; margin-top: 8px; font-weight: 600; text-decoration: none; }

.gs-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: -2px;
    border: 2px solid #ccc;
    border-top-color: #555;
    border-radius: 50%;
    animation: gs-spin .7s linear infinite;
}
@keyframes gs-spin { to { transform: rotate(360deg); } }

@media (max-width: 575.98px) {
    .gs-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; }
}
