/**
 * Appliance Comparison Table Widget Styles
 * Author: Mehedi Hasan
 * Version: 1.2.0
 * All classes prefixed with .actw- to avoid conflicts.
 */

.actw-wrap {
    --actw-brand: #22c4d4;
    --actw-brand-dark: #0d8a98;
    --actw-brand-darker: #075863;
    --actw-ink: #0f1b2d;
    --actw-ink-soft: #1e3550;
    --actw-muted: #5b6b80;
    --actw-bg: #f7fafc;
    --actw-card: #ffffff;
    --actw-line: #e3e9f0;
    --actw-line-soft: #eef2f7;
    --actw-good: #16a34a;
    --actw-good-bg: #dcfce7;
    --actw-bad: #dc2626;
    --actw-bad-bg: #fee2e2;
    --actw-warn: #f59e0b;
    --actw-warn-bg: #fef3c7;
    --actw-yellow: #fbbf24;
    --actw-shadow-xl: 0 30px 60px -15px rgba(15, 27, 45, 0.22), 0 10px 20px -10px rgba(15, 27, 45, 0.1);
    --actw-shadow-lg: 0 20px 50px -10px rgba(15, 27, 45, 0.18), 0 8px 16px -8px rgba(15, 27, 45, 0.1);
    --actw-shadow-md: 0 8px 24px rgba(15, 27, 45, 0.08);
    --actw-shadow-sm: 0 2px 8px rgba(15, 27, 45, 0.06);
    --actw-radius-lg: 24px;
    --actw-radius-md: 18px;
    --actw-radius-sm: 12px;

    color: var(--actw-ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

.actw-wrap *,
.actw-wrap *::before,
.actw-wrap *::after {
    box-sizing: border-box;
}

/* ====================================================================
   DESKTOP TABLE
   ==================================================================== */
.actw-desktop {
    background: #fff;
    border-radius: var(--actw-radius-lg);
    box-shadow: var(--actw-shadow-xl);
    overflow: hidden;
    border: 1px solid var(--actw-line);
    position: relative;
}

.actw-desktop table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    table-layout: fixed;
}

/* ----- Column widths for visual balance -----
   First col (features) takes more width since it has descriptive text;
   the three competitor columns share the rest equally. */
.actw-desktop table colgroup col:first-child,
.actw-desktop thead th:first-child,
.actw-desktop tbody td:first-child {
    width: 34%;
}

/* ====================================================================
   HEADER ROW — premium, balanced
   ==================================================================== */
.actw-desktop thead th {
    padding: 32px 22px 26px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid var(--actw-line);
    position: relative;
    vertical-align: bottom;
    color: var(--actw-ink);
}

/* The first cell is intentionally empty — no awkward "Feature" label.
   It gets a subtle background so the visual rhythm holds. */
.actw-desktop thead th.actw-feature-th {
    background: #ffffff;
    border-bottom: 2px solid var(--actw-line);
    border-right: 1px solid var(--actw-line-soft);
}

.actw-desktop thead th .actw-col-label {
    display: block;
    font-size: 12px;
    color: var(--actw-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    margin-bottom: 10px;
    opacity: 0.85;
}

.actw-desktop thead th .actw-col-name {
    display: block;
    font-size: 19px;
    color: var(--actw-ink);
    font-weight: 800;
    letter-spacing: -0.4px;
    line-height: 1.25;
}

/* Winner header — the hero column */
.actw-desktop thead th.actw-winner {
    background: linear-gradient(180deg, var(--actw-brand-dark) 0%, var(--actw-brand-darker) 100%);
    position: relative;
    padding-top: 50px;
    border-bottom: none;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.actw-desktop thead th.actw-winner .actw-col-label {
    color: rgba(255, 255, 255, 0.78);
    opacity: 1;
}

.actw-desktop thead th.actw-winner .actw-col-name {
    color: #fff;
    font-size: 21px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.actw-desktop thead th.actw-winner .actw-badge-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: var(--actw-ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    padding: 7px 16px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
    white-space: nowrap;
    text-transform: uppercase;
}

/* ====================================================================
   BODY ROWS
   ==================================================================== */
.actw-desktop tbody td {
    padding: 22px 22px;
    border-bottom: 1px solid var(--actw-line-soft);
    font-size: 15px;
    text-align: center;
    vertical-align: middle;
    color: var(--actw-ink);
    transition: background 0.2s ease;
}

.actw-desktop tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--actw-ink);
    padding-left: 28px;
    padding-right: 16px;
    background: linear-gradient(90deg, #fafbfc 0%, #f6f8fb 100%);
    border-right: 1px solid var(--actw-line-soft);
}

.actw-desktop tbody tr:last-child td {
    border-bottom: none;
}

.actw-desktop tbody tr:hover td {
    background: #f8fafc;
}

.actw-desktop tbody tr:hover td:first-child {
    background: linear-gradient(90deg, #eef2f7 0%, #e8edf3 100%);
}

/* Winner column body — subtle highlight runs through every row */
.actw-desktop tbody td.actw-winner-col {
    background: linear-gradient(180deg, rgba(34, 196, 212, 0.06) 0%, rgba(13, 138, 152, 0.09) 100%);
    border-left: 1px solid rgba(34, 196, 212, 0.25);
    border-right: 1px solid rgba(34, 196, 212, 0.25);
    position: relative;
}

.actw-desktop tbody tr:hover td.actw-winner-col {
    background: linear-gradient(180deg, rgba(34, 196, 212, 0.12) 0%, rgba(13, 138, 152, 0.16) 100%);
}

.actw-desktop tbody tr:last-child td.actw-winner-col {
    border-bottom: 1px solid rgba(34, 196, 212, 0.25);
}

/* ====================================================================
   STATUS INDICATORS
   ==================================================================== */
.actw-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

.actw-status-yes {
    background: var(--actw-good-bg);
    color: var(--actw-good);
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.15);
}

.actw-status-yes.actw-featured {
    background: linear-gradient(135deg, var(--actw-good) 0%, #15803d 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    width: 38px;
    height: 38px;
    font-size: 18px;
}

.actw-status-no {
    background: var(--actw-bad-bg);
    color: var(--actw-bad);
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.actw-status-partial {
    display: inline-flex;
    align-items: center;
    background: var(--actw-warn-bg);
    color: #92400e;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.actw-status-partial::before {
    content: "~";
    margin-right: 5px;
    font-weight: 800;
    opacity: 0.7;
}

.actw-extra-note {
    display: block;
    font-size: 12px;
    color: var(--actw-muted);
    margin-top: 6px;
    font-weight: 500;
    line-height: 1.4;
    font-style: italic;
}

/* ====================================================================
   FEATURE NAME + ICON
   ==================================================================== */
.actw-feature {
    display: flex;
    align-items: center;
    gap: 14px;
}

.actw-feature-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    border: 1px solid rgba(34, 196, 212, 0.25);
    line-height: 1;
    color: var(--actw-brand-dark);
    box-shadow: 0 2px 6px rgba(34, 196, 212, 0.1);
}

.actw-feature-icon i {
    font-size: 15px;
    line-height: 1;
    color: inherit;
}

.actw-feature-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: block;
}

.actw-feature span {
    flex: 1;
    line-height: 1.4;
}

/* ====================================================================
   BOTTOM CTA (desktop)
   ==================================================================== */
.actw-cta-row {
    background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
    padding: 28px 24px;
    text-align: center;
    border-top: 2px solid var(--actw-line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.actw-cta-text {
    font-size: 16px;
    color: var(--actw-ink);
    font-weight: 600;
}

.actw-cta-text strong {
    color: var(--actw-brand-darker);
    font-weight: 800;
}

/* Button base — overridable via Elementor Style controls */
.actw-cta-btn,
.actw-mobile-cta-card .actw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--actw-brand) 0%, var(--actw-brand-dark) 100%);
    color: #fff;
    padding: 14px 26px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    line-height: 1.2;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.actw-cta-btn:hover,
.actw-cta-btn:focus,
.actw-mobile-cta-card .actw-btn:hover,
.actw-mobile-cta-card .actw-btn:focus {
    color: #fff;
    text-decoration: none;
}

/* Button icon containers */
.actw-cta-btn .actw-btn-icon,
.actw-cta-btn .actw-btn-icon-before,
.actw-mobile-cta-card .actw-btn .actw-btn-icon,
.actw-mobile-cta-card .actw-btn .actw-btn-icon-before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.actw-cta-btn .actw-btn-icon {
    margin-left: 8px;
}

.actw-cta-btn .actw-btn-icon-before {
    margin-right: 8px;
}

.actw-cta-btn .actw-btn-icon i,
.actw-cta-btn .actw-btn-icon-before i,
.actw-mobile-cta-card .actw-btn .actw-btn-icon i,
.actw-mobile-cta-card .actw-btn .actw-btn-icon-before i {
    font-size: 14px;
    line-height: 1;
    color: inherit;
}

.actw-cta-btn .actw-btn-icon svg,
.actw-cta-btn .actw-btn-icon-before svg,
.actw-mobile-cta-card .actw-btn .actw-btn-icon svg,
.actw-mobile-cta-card .actw-btn .actw-btn-icon-before svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    display: block;
}

/* ====================================================================
   MOBILE CARDS
   ==================================================================== */
.actw-mobile {
    display: none;
}

.actw-mobile-cards {
    display: grid;
    gap: 18px;
}

.actw-mobile-card {
    background: #fff;
    border-radius: var(--actw-radius-md);
    box-shadow: var(--actw-shadow-md);
    overflow: hidden;
    border: 1px solid var(--actw-line);
    position: relative;
}

.actw-mobile-card.actw-winner-card {
    border: 2px solid var(--actw-brand);
    box-shadow: 0 16px 40px -10px rgba(34, 196, 212, 0.4), 0 4px 12px rgba(34, 196, 212, 0.15);
    margin-top: 8px; /* room for the floating badge */
}

/* Card header */
.actw-mobile-card-head {
    padding: 20px 22px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--actw-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.actw-winner-card .actw-mobile-card-head {
    background: linear-gradient(135deg, var(--actw-brand-dark) 0%, var(--actw-brand-darker) 100%);
    color: #fff;
    position: relative;
    padding: 24px 22px 22px;
}

.actw-winner-badge-mobile {
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, var(--actw-yellow) 0%, #f59e0b 100%);
    color: var(--actw-ink);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    padding: 6px 14px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.5);
    z-index: 2;
    white-space: nowrap;
    text-transform: uppercase;
}

.actw-mobile-card-head .actw-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    color: var(--actw-muted);
    margin-bottom: 6px;
}

.actw-winner-card .actw-mobile-card-head .actw-label {
    color: rgba(255, 255, 255, 0.75);
}

.actw-mobile-card-head .actw-name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--actw-ink);
    line-height: 1.2;
}

.actw-winner-card .actw-mobile-card-head .actw-name {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.actw-mobile-card-head .actw-score {
    background: #fff;
    color: var(--actw-ink);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    text-align: center;
    min-width: 70px;
    border: 1px solid var(--actw-line);
    flex-shrink: 0;
    box-shadow: var(--actw-shadow-sm);
}

.actw-winner-card .actw-mobile-card-head .actw-score {
    background: linear-gradient(135deg, var(--actw-yellow) 0%, #f59e0b 100%);
    color: var(--actw-ink);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.actw-mobile-card-head .actw-score .actw-num {
    display: block;
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
}

.actw-mobile-card-head .actw-score .actw-out {
    display: block;
    font-size: 9px;
    color: var(--actw-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 3px;
}

.actw-winner-card .actw-mobile-card-head .actw-score .actw-out {
    color: var(--actw-ink);
    opacity: 0.75;
}

/* Card body */
.actw-mobile-card-body {
    padding: 6px 0;
}

.actw-mobile-feature-row {
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--actw-line-soft);
}

.actw-mobile-feature-row:last-child {
    border-bottom: none;
}

.actw-mobile-feature-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    color: var(--actw-ink);
    font-weight: 600;
    flex: 1;
    line-height: 1.4;
}

.actw-mobile-feature-name .actw-feature-icon {
    width: 32px;
    height: 32px;
    font-size: 13px;
    border-radius: 9px;
}

.actw-mobile-feature-name .actw-feature-icon i {
    font-size: 13px;
}

.actw-mobile-feature-name .actw-feature-icon svg {
    width: 14px;
    height: 14px;
}

.actw-mobile-feature-status {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.actw-mobile-feature-status .actw-status {
    width: 28px;
    height: 28px;
    font-size: 14px;
}

/* Mobile CTA card */
.actw-mobile-cta-card {
    background: linear-gradient(135deg, var(--actw-ink) 0%, var(--actw-ink-soft) 100%);
    color: #fff;
    border-radius: var(--actw-radius-md);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--actw-shadow-md);
    position: relative;
    overflow: hidden;
}

.actw-mobile-cta-card::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(34, 196, 212, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.actw-mobile-cta-card .actw-icon {
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1;
    position: relative;
}

.actw-mobile-cta-card h4 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.3;
    color: #fff;
    letter-spacing: -0.3px;
    position: relative;
}

.actw-mobile-cta-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 22px;
    line-height: 1.55;
    position: relative;
}

.actw-mobile-cta-card .actw-btn {
    display: inline-flex;
    width: 100%;
    position: relative;
}

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

/* Tablet — make the desktop table feel tighter before switching to cards */
@media (max-width: 1024px) {
    .actw-desktop thead th {
        padding: 26px 16px 22px;
    }
    .actw-desktop thead th .actw-col-name {
        font-size: 17px;
    }
    .actw-desktop thead th.actw-winner .actw-col-name {
        font-size: 19px;
    }
    .actw-desktop tbody td {
        padding: 18px 14px;
    }
    .actw-desktop tbody td:first-child {
        padding-left: 22px;
        font-size: 14px;
    }
    .actw-feature-icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }
    .actw-feature {
        gap: 12px;
    }
}

/* Switch to card layout */
@media (max-width: 880px) {
    .actw-desktop {
        display: none;
    }
    .actw-mobile {
        display: block;
    }
}

/* Mid-mobile refinements */
@media (max-width: 600px) {
    .actw-mobile-cards {
        gap: 16px;
    }
    .actw-mobile-card-head {
        padding: 18px 18px;
    }
    .actw-winner-card .actw-mobile-card-head {
        padding: 22px 18px 20px;
    }
    .actw-mobile-card-head .actw-name {
        font-size: 17px;
    }
    .actw-mobile-card-head .actw-score {
        min-width: 60px;
        padding: 8px 12px;
    }
    .actw-mobile-card-head .actw-score .actw-num {
        font-size: 17px;
    }
    .actw-mobile-feature-row {
        padding: 13px 18px;
    }
    .actw-mobile-cta-card {
        padding: 24px 20px;
    }
    .actw-mobile-cta-card h4 {
        font-size: 18px;
    }
}

/* Small mobile — keep it readable */
@media (max-width: 420px) {
    .actw-mobile-card-head {
        padding: 16px 14px;
    }
    .actw-winner-card .actw-mobile-card-head {
        padding: 20px 14px 18px;
    }
    .actw-winner-badge-mobile {
        left: 14px;
        font-size: 9px;
        padding: 5px 11px;
        letter-spacing: 1px;
    }
    .actw-mobile-card-head .actw-name {
        font-size: 16px;
    }
    .actw-mobile-card-head .actw-label {
        font-size: 10px;
    }
    .actw-mobile-card-head .actw-score {
        min-width: 56px;
        padding: 7px 10px;
    }
    .actw-mobile-card-head .actw-score .actw-num {
        font-size: 15px;
    }
    .actw-mobile-card-head .actw-score .actw-out {
        font-size: 8px;
    }
    .actw-mobile-feature-row {
        padding: 12px 14px;
        gap: 10px;
    }
    .actw-mobile-feature-name {
        font-size: 13px;
        gap: 10px;
    }
    .actw-mobile-feature-name .actw-feature-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }
    .actw-mobile-feature-name .actw-feature-icon i {
        font-size: 11px;
    }
    .actw-mobile-feature-status .actw-status {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
    .actw-status-partial {
        font-size: 12px;
        padding: 5px 10px;
    }
    .actw-extra-note {
        font-size: 11px;
    }
    .actw-mobile-cta-card {
        padding: 22px 18px;
        border-radius: var(--actw-radius-sm);
    }
    .actw-mobile-cta-card .actw-icon {
        font-size: 30px;
    }
    .actw-mobile-cta-card h4 {
        font-size: 17px;
    }
    .actw-mobile-cta-card p {
        font-size: 13px;
    }
}
