/* ==========================================================================
   Wixel Comparison Table Widget
   ========================================================================== */

.wct {
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Rows
   -------------------------------------------------------------------------- */

.wct__row {
    display: flex;
    align-items: stretch;
    transition: background-color 0.2s ease;
}

.wct__row + .wct__row {
    border-top: 1px solid #eee;
}

/* --------------------------------------------------------------------------
   Cells
   -------------------------------------------------------------------------- */

.wct__cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    text-align: center;
    position: relative;
    min-width: 0;
}

.wct__cell--label {
    text-align: left;
    align-items: flex-start;
    justify-content: center;
    flex: 1.8;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.wct__header {
    font-weight: 600;
}

.wct__header .wct__cell {
    padding: 20px 15px;
}

.wct__header--sticky {
    position: sticky;
    top: 0;
    z-index: 10;
    background: inherit;
}

.wct__header-image {
    margin-bottom: 8px;
}

.wct__header-image img {
    object-fit: cover;
    display: block;
    max-width: 100%;
    height: auto;
}

.wct__header-title {
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1.3;
}

.wct__header-subtitle {
    font-size: 1.3em;
    font-weight: 600;
    margin-top: 4px;
    opacity: 0.85;
}

.wct__header-label {
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Ribbon / Badge
   -------------------------------------------------------------------------- */

.wct__ribbon {
    display: inline-block;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Feature Name & Tooltip
   -------------------------------------------------------------------------- */

.wct__feature-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wct__tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.wct__tooltip-trigger:hover,
.wct__tooltip-trigger:focus {
    opacity: 1;
}

.wct__tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    max-width: 220px;
    white-space: normal;
    font-size: 0.8em;
    font-weight: 400;
    padding: 6px 10px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 20;
}

.wct__tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
}

.wct__tooltip-trigger:hover .wct__tooltip,
.wct__tooltip-trigger:focus .wct__tooltip {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Cell Content (icons & text)
   -------------------------------------------------------------------------- */

.wct__cell-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.wct__cell-icon i,
.wct__cell-icon svg {
    display: block;
    fill: currentColor;
}

.wct__icon--check {
    color: #22c55e;
}

.wct__icon--cross {
    color: #ef4444;
}

.wct__icon--custom {
    color: #6b7280;
}

.wct__cell-text {
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Section Header Row
   -------------------------------------------------------------------------- */

.wct__row--section-header {
    background-color: #f1f5f9;
}

.wct__row--section-header .wct__feature-name {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.wct__row--buttons .wct__cell {
    padding-top: 20px;
    padding-bottom: 20px;
}

.wct__btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.25s ease, transform 0.25s ease;
    border: 2px solid currentColor;
    line-height: 1.2;
    white-space: nowrap;
}

.wct__btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.wct__btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Table Styles
   -------------------------------------------------------------------------- */

/* Striped */
.wct--striped .wct__row:nth-child(even) {
    background-color: #f9f9f9;
}

/* Bordered */
.wct--bordered .wct__cell + .wct__cell {
    border-left: 1px solid #eee;
}

/* Hover */
.wct--hover .wct__row:not(.wct__header):not(.wct__row--buttons):hover {
    background-color: #f0f4ff;
}

/* --------------------------------------------------------------------------
   Highlighted Column
   -------------------------------------------------------------------------- */

.wct__cell--highlighted.wct__cell--header {
    background-color: #f0f4ff;
}

.wct__cell--highlighted:not(.wct__cell--header) {
    background-color: rgba(99, 102, 241, 0.04);
}

/* --------------------------------------------------------------------------
   Responsive — Horizontal Scroll
   -------------------------------------------------------------------------- */

.wct--responsive-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------------------
   Responsive — Stack on Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
    .wct--responsive-stack .wct__row {
        flex-wrap: wrap;
    }

    .wct--responsive-stack .wct__cell--label {
        flex: 0 0 100%;
        text-align: center;
        align-items: center;
        font-weight: 600;
        padding-bottom: 4px;
        border-bottom: 1px solid #eee;
    }

    .wct--responsive-stack .wct__cell:not(.wct__cell--label) {
        flex: 1 1 0;
        min-width: 0;
    }

    .wct--responsive-stack .wct__header .wct__cell--label {
        display: none;
    }

    .wct--responsive-stack .wct__row--section-header .wct__cell:not(.wct__cell--label) {
        display: none;
    }
}
