/**
 * Edge Filter Compare Widget Styles
 *
 * @package Elementoredge
 * @since 1.0.0
 */

/* ============================================================
   Google Fonts
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================================
   Container
   ============================================================ */
.edge-filter-compare {
    font-family: 'Inter', sans-serif;
    width: 100%;
}

/* ============================================================
   Section Heading
   ============================================================ */
.efc-heading {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
}

.efc-heading__title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.efc-heading__subtitle {
    font-size: 15px;
    color: #8390a8;
    margin: 0;
    line-height: 1.65;
    max-width: 600px;
    text-align: center;
}

/* ============================================================
   Filter Buttons
   ============================================================ */
.efc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    align-items: center;
    justify-content: center;
}

.efc-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    transition: all 0.22s ease;
    white-space: nowrap;
    letter-spacing: 0.005em;
    outline: none;
}

.efc-filter-btn:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.85);
}

/* Active: vivid purple-to-violet gradient — matches GetGenie brand */
.efc-filter-btn--active {
    background: linear-gradient(90deg, #b44aff 0%, #7b54ff 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(150, 60, 255, 0.38);
}

.efc-filter-btn--active:hover {
    background: linear-gradient(90deg, #c255ff 0%, #8a62ff 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 26px rgba(150, 60, 255, 0.50);
}

.efc-filter-btn__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.efc-filter-btn__icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* ============================================================
   Table Outer Wrapper (border, radius, sticky context)
   ============================================================ */
.efc-table-outer {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    position: relative;
}

/* ============================================================
   Table Wrapper (horizontal scroll only — no overflow on Y axis
   so position:sticky on the header is not broken)
   ============================================================ */
.efc-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 14px 14px;
}

/* ============================================================
   Table Structure
   ============================================================ */
.efc-table {
    width: 100%;
    min-width: 680px;
    display: flex;
    flex-direction: column;
}

/* ---- Rows ---- */
.efc-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 52px;
}

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

.efc-row--feature {
    background-color: #13172a;
    transition: background-color 0.15s ease;
}

.efc-row--feature:hover {
    background-color: #1a1f38;
}

.efc-row--alt {
    background-color: #0f1221;
}

.efc-row--alt:hover {
    background-color: #161a30;
}

.efc-row--category {
    background-color: #1c2040;
    min-height: 44px;
}

/* ---- Sticky Header ---- */
.efc-table__header {
    position: sticky;
    top: 65px;
    z-index: 10;
    border-radius: 14px 14px 0 0;
}

/* Clips header row content when the body table scrolls horizontally.
   scrollLeft is synced via JS — overflow:hidden here does not create
   a scroll container, so position:sticky above is unaffected. */
.efc-header-inner {
    overflow: hidden;
    border-radius: 14px 14px 0 0;
}

.efc-header-inner .efc-row--header {
    min-width: 680px; /* match .efc-table min-width */
}

.efc-row--header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background-color: #1c2040;
    min-height: 64px;
}

.efc-header__label {
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
    letter-spacing: -0.01em;
}

/* ---- Cells ---- */
.efc-cell {
    flex: 1 1 0;
    padding: 14px 10px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: opacity 0.2s ease;
}

.efc-cell:last-child {
    border-right: none;
}

/* Label column */
.efc-cell--label {
    flex: 0 0 190px;
    text-align: left;
    justify-content: flex-start;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 20px;
    background: inherit;
}

/* Logo cells */
.efc-cell--logo {
    padding: 16px 8px;
    background: inherit;
}

.efc-cell--logo img {
    max-height: 36px;
    max-width: 115px;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    /* filter: brightness(0) invert(1);
    opacity: 0.9; */
}

/* ============================================================
   Featured / Highlighted column (first data column)
   ============================================================ */
/* .efc-cell--featured {
    background: rgba(130, 70, 255, 0.07);
    border-left: 1px solid rgba(140, 80, 255, 0.20);
    border-right: 1px solid rgba(140, 80, 255, 0.20) !important;
} */
/* 
.efc-row--header .efc-cell--featured {
    background: rgba(130, 70, 255, 0.14);
} */

/* ============================================================
   Filter Visibility
   ============================================================ */
.filterDiv:not(.show-filterDiv) {
    display: none !important;
}

/* ============================================================
   Row Labels
   ============================================================ */
.efc-row__label {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    color: #c5cce0;
    line-height: 1.45;
    font-family: 'Inter', sans-serif;
}

.efc-row--category .efc-cell--label .efc-row__label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ============================================================
   Icons
   ============================================================ */
.efc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.efc-icon svg {
    display: block;
}

/* ============================================================
   Cell Content
   ============================================================ */
.efc-text {
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #7e899f;
    line-height: 1.45;
    word-break: break-word;
    text-align: center;
}

.efc-dash {
    font-size: 16px;
    color: #3a3f5a;
    line-height: 1;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1200px) {
    .efc-cell--label {
        flex: 0 0 165px;
    }
}

@media (max-width: 1024px) {
    .efc-cell--label {
        flex: 0 0 140px;
        padding: 13px 14px;
    }
    .efc-cell {
        padding: 13px 8px;
    }
}

@media (max-width: 768px) {
    .efc-heading__title { font-size: 24px; }
    .efc-heading__subtitle { font-size: 13px; }
    .efc-filters { gap: 8px; margin-bottom: 20px; }
    .efc-filter-btn { padding: 9px 15px; font-size: 12px; gap: 6px; }
    .efc-filter-btn__icon svg { width: 14px; height: 14px; }
    .efc-row { min-height: 44px; }
    .efc-cell { padding: 11px 7px; }
    .efc-cell--label { flex: 0 0 110px; padding: 11px 10px; }
    .efc-cell--logo img { max-height: 24px; max-width: 80px; }
    .efc-text { font-size: 11px; }
    .efc-row__label { font-size: 12px; }
    .efc-header__label { font-size: 13px; }
    .efc-row--header { min-height: 52px; }
}

@media (max-width: 480px) {
    .efc-filters { gap: 6px; }
    .efc-filter-btn { padding: 8px 12px; font-size: 11px; }
    .efc-cell--label { flex: 0 0 90px; padding: 10px 8px; }
    .efc-heading__title { font-size: 20px; }
}

/* Column title label in header row */
.efc-col-title {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    margin-top: 6px;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ============================================================
   Mobile Card View – hidden on desktop, shown ≤ 1024px
   Transposes the table: each feature row becomes a card,
   each column becomes a logo + value list item.
   ============================================================ */
.efc-mobile-view {
    display: none;
}

@media (max-width: 1024px) {

    /* ---- Hide desktop table, reveal mobile cards ---- */
    .efc-table-outer {
        display: none;
    }

    .efc-mobile-view {
        display: block;
    }

    /* ---- Category heading (between card groups) ---- */
    .efc-mobile-cat-heading {
        padding: 18px 4px 8px;
    }

    .efc-mobile-cat-heading .efc-row__label {
        font-size: 11px;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.45);
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin: 0;
        padding: 0;
    }

    /* ---- Card container ---- */
    .efc-mobile-card {
        background: #141928;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.07);
        margin-bottom: 10px;
        overflow: hidden;
    }

    .efc-mobile-card--hidden {
        display: none;
    }

    /* ---- Card title (the feature-row label) ---- */
    .efc-mobile-card__title {
        font-family: 'Inter', sans-serif;
        font-size: 15px;
        font-weight: 700;
        color: #ffffff;
        padding: 15px 18px;
        background: #1b2136;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        letter-spacing: -0.01em;
        line-height: 1.3;
    }

    /* ---- Card rows wrapper ---- */
    .efc-mobile-card__rows {
        display: flex;
        flex-direction: column;
    }

    /* ---- Individual tool row ---- */
    .efc-mobile-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 13px 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .efc-mobile-item:last-child {
        border-bottom: none;
    }

    /* filterDiv visibility – mirrors the desktop table logic */
    .efc-mobile-item.filterDiv:not(.show-filterDiv) {
        display: none;
    }

    /* ---- Logo side ---- */
    .efc-mobile-item__logo {
        flex: 0 0 auto;
        width: 90px;
    }

    .efc-mobile-item__logo img {
        max-height: 28px;
        max-width: 90px;
        width: auto;
        object-fit: contain;
        display: block;
    }

    /* ---- Value side ---- */
    .efc-mobile-item__value {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        text-align: right;
        min-width: 0;
    }

    .efc-mobile-item__value .efc-text {
        font-size: 13px;
        color: #8b95ae;
        text-align: right;
        line-height: 1.4;
        word-break: break-word;
    }

    .efc-mobile-item__value .efc-icon {
        justify-content: flex-end;
    }

    .efc-mobile-item__value .efc-dash {
        font-size: 18px;
        color: #3a3f5a;
    }
}
