/* =======================================================
   Universal Comparison Table — Frontend Styles
   Based on seo-table-block design system
   ======================================================= */

/* ── Block wrapper ── */
.uct-block {
    margin-bottom: 40px;
}

/* ── Header ── */
.uct-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.uct-header__number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 6px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    background: var(--accent-color, #00e574);
}

.uct-header__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main, #e2e8f0);
    margin: 0;
}

/* ── Description ── */
.uct-description {
    font-size: 15px;
    color: var(--text-muted, #8899a6);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ── Table wrapper (horizontal scroll) ── */
.uct-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background-color: var(--bg-surface, #1a2032);
    border: 1px solid var(--border-color, #262d3d);
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color, #262d3d) transparent;
}

.uct-table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.uct-table-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--border-color, #262d3d);
    border-radius: 10px;
}

/* ── Table ── */
.uct-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    text-align: left;
}

/* ── Header cells ── */
.uct-th {
    background-color: rgba(21, 26, 35, 0.95);
    color: var(--text-muted, #8899a6);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color, #262d3d);
    white-space: nowrap;
}

/* ── First header: sticky ── */
.uct-th--name {
    position: sticky;
    left: 0;
    z-index: 2;
}

.uct-th--name::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(to right, rgba(0,0,0,0.2) 0%, transparent 100%);
    pointer-events: none;
}

/* ── Body cells ── */
.uct-td {
    padding: 16px;
    font-size: 14px;
    color: var(--text-main, #e2e8f0);
    border-bottom: 1px solid rgba(38, 45, 61, 0.4);
    white-space: nowrap;
}

.uct-row:last-child .uct-td {
    border-bottom: none;
}

.uct-row:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.15);
}

.uct-row:hover .uct-td {
    background-color: rgba(0, 229, 116, 0.05);
}

/* ── First column cell: sticky ── */
.uct-td--name {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: var(--bg-surface, #1a2032);
    font-weight: 600;
}

.uct-td--name::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(to right, rgba(0,0,0,0.2) 0%, transparent 100%);
    pointer-events: none;
}

.uct-row:nth-child(even) .uct-td--name {
    background-color: #12161e;
}

.uct-row:hover .uct-td--name {
    background-color: #171d26;
}

/* ── Name cell inner ── */
.uct-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.uct-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px;
}

.uct-name-link {
    color: var(--text-main, #e2e8f0);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.uct-name-link:hover {
    color: var(--accent-color, #00e574);
}

.uct-name-text {
    font-weight: 600;
    color: var(--text-main, #e2e8f0);
}

/* ── Link values ── */
.uct-td a {
    color: var(--accent-color, #00e574) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.uct-td a:hover {
    text-decoration: underline;
}

/* ── Icons (SVG check / cross) ── */
.uct-icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    vertical-align: middle;
}

/* ── Rating ── */
.uct-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #F59E0B;
    font-weight: 700;
    font-size: 14px;
}

.uct-rating i { font-size: 14px; }

/* ── Bonus type badges ── */
.uct-badge {
    display: inline-block;
    background: rgba(0, 229, 116, 0.1);
    color: var(--accent-color, #00e574);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin: 2px 3px 2px 0;
    white-space: nowrap;
}

/* =======================================================
   RESPONSIVE
   ======================================================= */

@media (max-width: 768px) {
    .uct-table { min-width: 0; }

    .uct-table,
    .uct-table thead,
    .uct-table tbody,
    .uct-table th,
    .uct-table td,
    .uct-table tr { display: block; }

    .uct-table thead { display: none; }

    .uct-row {
        margin-bottom: 12px;
        border: 1px solid var(--border-color, #262d3d);
        border-radius: 12px;
        overflow: hidden;
        background: var(--bg-surface, #1a2032);
    }

    .uct-row:nth-child(even) { background: var(--bg-surface, #1a2032); }

    .uct-td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        position: static !important;
    }

    .uct-td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 12px;
        color: var(--text-muted, #8899a6);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        text-align: left;
        flex-shrink: 0;
        margin-right: 12px;
    }

    .uct-td--name {
        background: rgba(21, 26, 35, 0.95) !important;
        position: static !important;
    }

    .uct-td--name::before { display: none; }
    .uct-td--name::after  { display: none; }

    .uct-name-cell {
        width: 100%;
        justify-content: flex-start;
    }
}
