/**
 * Flavor GPU Compare — Inline Review Widget CSS
 */

.gcw-widget {
    margin: 28px 0;
    border: 1.5px solid var(--line, #e0e4ef);
    border-radius: 10px;
    background: var(--panel, #fff);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: visible;
    position: relative;
}

/* Header strip */
.gcw-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px 12px;
    border-bottom: 1px solid var(--line, #e0e4ef);
}

.gcw-header-icon {
    width: 18px;
    height: 18px;
    color: var(--accent, #2962ff);
    flex-shrink: 0;
}

.gcw-header-text {
    flex: 1;
    min-width: 0;
}

.gcw-header-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text, #1a1a2e);
    margin: 0 0 1px;
    line-height: 1.3;
}

.gcw-header-sub {
    font-size: 11px;
    color: var(--text-muted, #888);
    margin: 0;
}

/* Pill row: [RTX 5080] vs [Any GPU] */
.gcw-pill-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.gcw-vs-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted, #aaa);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gcw-this-gpu {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--accent, #2962ff);
    color: #fff;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.gcw-any-gpu-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--panel-alt, #f0f2f8);
    color: var(--text-muted, #666);
    border: 1.5px dashed var(--line, #ccd0e0);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
}
.gcw-any-gpu-pill:hover {
    background: rgba(41,98,255,0.07);
    border-color: var(--accent, #2962ff);
    color: var(--accent, #2962ff);
}

/* Search area */
.gcw-search {
    padding: 12px 16px 14px;
    position: relative;
}

/* Input wrap is the positioning parent for both input and results */
.gcw-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.gcw-search-icon {
    position: absolute;
    left: 11px;
    width: 15px;
    height: 15px;
    color: var(--text-muted, #aaa);
    pointer-events: none;
    flex-shrink: 0;
    z-index: 1;
}

.gcw-input {
    width: 100%;
    height: 40px;
    border: 1.5px solid var(--line, #e0e4ef);
    border-radius: 8px;
    padding: 0 36px 0 34px;
    font-size: 13px;
    color: var(--text, #1a1a2e);
    background: var(--panel, #fff);
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    box-sizing: border-box;
}
.gcw-input:focus {
    border-color: var(--accent, #2962ff);
    box-shadow: 0 0 0 3px rgba(41,98,255,0.12);
}
.gcw-input::placeholder { color: var(--text-muted, #bbb); }

.gcw-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: var(--text-muted, #aaa);
    display: flex;
    align-items: center;
    line-height: 1;
    z-index: 1;
}
.gcw-clear:hover { color: var(--text, #333); }
.gcw-clear svg { width: 13px; height: 13px; }

/* Results dropdown — positioned relative to .gcw-input-wrap */
.gcw-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 3px);
    z-index: 9999;
    background: var(--panel, #fff);
    border: 1.5px solid var(--accent, #2962ff);
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 260px;
    overflow-y: auto;
}

.gcw-result-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.12s;
    font-size: 13px;
    color: var(--text, #1a1a2e);
}
.gcw-result-item:hover,
.gcw-result-item.is-focused { background: rgba(41,98,255,0.07); }

.gcw-result-thumb {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--panel-alt, #f5f6fa);
}
.gcw-result-thumb--empty { background: var(--line, #e0e4ef); }

.gcw-brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #aaa;
}
.gcw-brand-dot.gcw-brand-nvidia  { background: #76b900; }
.gcw-brand-dot.gcw-brand-amd     { background: #ed1c24; }
.gcw-brand-dot.gcw-brand-intel   { background: #0071c5; }

.gcw-result-name {
    flex: 1;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gcw-result-cta {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent, #2962ff);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.12s;
}
.gcw-result-item:hover .gcw-result-cta,
.gcw-result-item.is-focused .gcw-result-cta { opacity: 1; }

.gcw-result--loading,
.gcw-result--empty {
    color: var(--text-muted, #aaa);
    font-style: italic;
    cursor: default;
    font-size: 12px;
    gap: 8px;
}
.gcw-result--loading:hover,
.gcw-result--empty:hover { background: none; }

.gcw-result-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--line, #e0e4ef);
    border-top-color: var(--accent, #2962ff);
    border-radius: 50%;
    animation: gcw-spin 0.6s linear infinite;
    flex-shrink: 0;
}
@keyframes gcw-spin { to { transform: rotate(360deg); } }
