/* ==========================================================================
   EW Specs Table Widget — Frontend Styles
   ========================================================================== */

/* ── Wrapper ────────────────────────────────────────────────────────────── */
.ew-specs-table-wrap {
    overflow: hidden;
    /* clips table corners and adds its own outer border */
    border-radius: 8px;
    border: 1px solid #e8ecf0;
}


/* ── Table base ─────────────────────────────────────────────────────────── */
.ew-specs-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    box-sizing: border-box;
    border: none !important;
    margin: 0 !important;
}

/* Auto width variant */
.ew-st-width-auto .ew-specs-table {
    width: auto;
}

/* ── Cells ──────────────────────────────────────────────────────────────── */
.ew-specs-table th,
.ew-specs-table td {
    padding: 10px 14px;
    vertical-align: middle;
    box-sizing: border-box;
    word-break: break-word;
}

/* ── Cell inner: flex container ─────────────────────────────────────────── */
.ew-st-cell-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Icon position: right → reverse flex */
.ew-st-cell-inner.ew-st-icon-right {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* ── Cell content elements ──────────────────────────────────────────────── */
.ew-st-cell-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ew-st-cell-icon i,
.ew-st-cell-icon svg {
    font-size: 18px;
    width: 18px;
    height: 18px;
    display: block;
}

.ew-st-cell-image {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.ew-st-cell-image img {
    display: block;
    width: 40px;
    height: auto;
    object-fit: contain;
}

.ew-st-cell-text {
    line-height: 1.45;
}

/* ── Header rows ───────────────────────────────────────────────────────── */
.ew-st-row-header th {
    background-color: #2d3748;
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    letter-spacing: 0.02em;
}

/* ── Data rows ──────────────────────────────────────────────────────────── */
.ew-st-row-data td {
    background-color: #ffffff;
    text-align: left;
    border-bottom: 1px solid #e8ecf0;
    transition: background-color 200ms ease, color 200ms ease;
}

/* ── Strip Outer Borders (prevent double borders with wrapper) ────────────── */
.ew-specs-table tr th:first-child,
.ew-specs-table tr td:first-child {
    border-left: none !important;
}
.ew-specs-table tr th:last-child,
.ew-specs-table tr td:last-child {
    border-right: none !important;
}
.ew-specs-table tr:first-child th,
.ew-specs-table tr:first-child td {
    border-top: none !important;
}
.ew-specs-table tr:last-child th,
.ew-specs-table tr:last-child td {
    border-bottom: none !important;
}

.ew-st-row-data:last-child td {
    border-bottom: none !important;
}

/* Zebra striping */
.ew-st-row-data:nth-child(even) td {
    background-color: #f7f9fc;
}

/* Hover */
.ew-st-row-data:hover td {
    /* overridden by Elementor selectors if hover bg is set */
    cursor: default;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {

    /* Stack cells vertically on small screens when > 2 columns */
    .ew-specs-table.ew-st-mobile-stack thead {
        display: none;
    }

    .ew-specs-table.ew-st-mobile-stack tbody,
    .ew-specs-table.ew-st-mobile-stack tr,
    .ew-specs-table.ew-st-mobile-stack td {
        display: block;
        width: 100% !important;
    }

    .ew-specs-table.ew-st-mobile-stack tr {
        border-bottom: 2px solid #e8ecf0;
        padding-bottom: 6px;
        margin-bottom: 6px;
    }

    .ew-specs-table.ew-st-mobile-stack tr:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .ew-specs-table.ew-st-mobile-stack td {
        border-bottom: none;
        padding: 4px 12px;
    }

    .ew-specs-table.ew-st-mobile-stack td:first-child {
        padding-top: 10px;
        font-weight: 700;
        font-size: 0.78em;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        opacity: 0.65;
    }
}

/* ── Image-only cells: center content ───────────────────────────────────── */
.ew-st-ct-image_only .ew-st-cell-inner {
    justify-content: inherit;
}