/* Page layout — keep navbar chrome untouched; only style page content */
.compare-page {
    padding-top: 2rem;
    padding-bottom: 6rem;
}

.compare-hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

.compare-hero p,
.compare-selector-hint p {
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.compare-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fbbf24;
    margin-bottom: 1.25rem;
}

.compare-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.compare-slot {
    position: relative;
    min-height: 180px;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px dashed rgba(0, 242, 255, 0.25);
    background: rgba(15, 23, 42, 0.55);
}

.compare-slot.has-tool {
    border-style: solid;
    border-color: rgba(0, 242, 255, 0.2);
}

.slot-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
    color: #e2e8f0;
    cursor: pointer;
}

.slot-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

.slot-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 242, 255, 0.12);
    color: #00f2ff;
    font-weight: 700;
}

.compare-slot h3 {
    font-size: 1.05rem;
    margin: 0 0 0.35rem;
    color: #e2e8f0;
}

.slot-meta,
.cell-muted {
    color: #64748b;
    font-size: 0.85rem;
}

.slot-link,
.cell-link {
    color: #00f2ff;
    text-decoration: none;
    font-size: 0.875rem;
}

.slot-empty {
    text-align: center;
}

.slot-plus {
    display: inline-block;
    font-size: 1.75rem;
    color: #00f2ff;
    margin-bottom: 0.35rem;
}

.slot-search {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: #e2e8f0;
}

.slot-suggestions {
    margin-top: 0.35rem;
    text-align: left;
    max-height: 180px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid rgba(0, 242, 255, 0.15);
    background: rgba(7, 10, 15, 0.98);
}

.slot-suggestions button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.75rem;
    border: 0;
    background: transparent;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.85rem;
}

.slot-suggestions button:hover {
    background: rgba(0, 242, 255, 0.08);
}

.compare-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(0, 242, 255, 0.15);
    background: rgba(15, 23, 42, 0.65);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.compare-table th,
.compare-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
    text-align: left;
}

.compare-table thead th {
    background: rgba(0, 0, 0, 0.25);
    color: #00f2ff;
}

.compare-table tbody th {
    width: 140px;
    color: #94a3b8;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.15);
}

.cell-desc {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 0.5rem;
}

.cell-chip {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #00f2ff;
    border: 1px solid rgba(0, 242, 255, 0.25);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}

.cell-list {
    margin: 0;
    padding-left: 1.1rem;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.cell-rating {
    color: #fbbf24;
}

.compare-selector-hint {
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 242, 255, 0.12);
    background: rgba(15, 23, 42, 0.45);
    text-align: center;
}

.compare-selector-hint .btn-primary {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #00f2ff, #8b5cf6);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Card compare control */
.compare-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #94a3b8;
    cursor: pointer;
    user-select: none;
}

.compare-toggle input {
    accent-color: #00f2ff;
    cursor: pointer;
}

.tool-card .btn-group {
    align-items: center;
    flex-wrap: wrap;
}

/* Floating compare bar */
.compare-bar {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%) translateY(120%);
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    background: rgba(7, 10, 15, 0.95);
    border: 1px solid rgba(0, 242, 255, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    color: #e2e8f0;
    transition: transform 0.25s ease;
    max-width: calc(100vw - 2rem);
}

.compare-bar.is-visible {
    transform: translateX(-50%) translateY(0);
}

.compare-bar-count {
    font-weight: 600;
    color: #00f2ff;
    white-space: nowrap;
}

.compare-bar-names {
    font-size: 0.85rem;
    color: #94a3b8;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compare-bar-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.compare-bar-actions a,
.compare-bar-actions button {
    border: none;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.compare-bar-actions .compare-now {
    background: linear-gradient(135deg, #00f2ff, #8b5cf6);
    color: #fff;
}

.compare-bar-actions .compare-now.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.compare-bar-actions .compare-clear {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
}

@media (max-width: 640px) {
    .compare-bar {
        flex-wrap: wrap;
        border-radius: 16px;
        justify-content: center;
        bottom: 0.75rem;
    }

    .compare-bar-names {
        display: none;
    }
}
