/* ==========================================================================
   CastKite Product Tabs — Stylesheet
   Minimal, black & white only. Inherits font from theme.
   ========================================================================== */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.ckpt-tabs-wrapper {
    margin: 32px 0;
}

/* ── Tab Navigation ─────────────────────────────────────────────────────── */
.ckpt-tab-nav {
    list-style: none;
    margin: 0 0 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #e0e0e0;
}

.ckpt-tab-nav__item {
    margin: 0;
}

.ckpt-tab-nav__btn {
    display: inline-block;
    padding: 12px 22px;
    background: transparent;
    color: #666;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    box-shadow: none !important;
    outline: none;
    margin-bottom: -1px;
    cursor: pointer;
    font-size: 0.9em;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    border-radius: 0 !important;
}

.ckpt-tab-nav__btn:hover,
.ckpt-tab-nav__btn:focus {
    background: transparent;
    color: #000;
    outline: none;
}

.ckpt-tab-nav__btn--active,
.ckpt-tab-nav__btn--active:hover,
.ckpt-tab-nav__btn--active:focus {
    background: transparent !important;
    color: #000;
    border: none !important;
    border-bottom: 2px solid #000 !important;
    box-shadow: none !important;
    outline: none;
}

/* ── Tab Panels ─────────────────────────────────────────────────────────── */
.ckpt-tab-panel {
    padding: 28px 0 0;
}

/* ── Description / Read More ────────────────────────────────────────────── */

/* Collapsed: clip at the calculated height and fade the bottom edge */
.ckpt-description__body--collapsed {
    max-height: var(--ckpt-collapse-height, 160px);
    overflow: hidden;
    position: relative;
}

/* Fade gradient */
.ckpt-description__body--collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
}

/* Expanded */
.ckpt-description__body--expanded {
    max-height: none;
    overflow: visible;
}

.ckpt-description__body--expanded::after {
    display: none;
}

/* Read More button — text link style */
.ckpt-readmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 14px;
    padding: 0;
    background: none;
    border: none;
    color: #000;
    font-size: 0.875em;
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ckpt-readmore-btn:hover {
    opacity: 0.6;
}

/* Chevron SVG icon */
.ckpt-readmore-btn__icon {
    display: block;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.ckpt-readmore-btn[aria-expanded="true"] .ckpt-readmore-btn__icon {
    transform: rotate(180deg);
}

/* ── Additional Information Table ───────────────────────────────────────── */
.ckpt-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.ckpt-info-table th,
.ckpt-info-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
}

.ckpt-info-table tr:first-child th,
.ckpt-info-table tr:first-child td {
    border-top: 1px solid #e0e0e0;
}

.ckpt-info-table__label {
    font-weight: 600;
    color: #000;
    width: 35%;
    white-space: nowrap;
}

.ckpt-info-table__value {
    color: #444;
}

/* ── Reviews ────────────────────────────────────────────────────────────── */
.ckpt-reviews {
    width: 100%;
}

/* ── FAQs Accordion ─────────────────────────────────────────────────────── */
.ckpt-faqs {
    border-top: 1px solid #e0e0e0;
}

.ckpt-faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.ckpt-faq-item__question {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 0.95em;
    font-family: inherit;
    font-weight: 600;
    color: #000 !important;
    text-align: left;
    gap: 16px;
    transition: opacity 0.15s;
    text-transform: none;
    letter-spacing: normal;
}

.ckpt-faq-item__question:hover,
.ckpt-faq-item__question:focus {
    background: transparent !important;
    color: #000 !important;
    opacity: 0.7;
    outline: none;
    box-shadow: none !important;
}

/* Chevron SVG icon for FAQ */
.ckpt-faq-item__icon {
    display: block;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.ckpt-faq-item__question[aria-expanded="true"] .ckpt-faq-item__icon {
    transform: rotate(180deg);
}

.ckpt-faq-item__answer[hidden] {
    display: none;
}

.ckpt-faq-item__answer-inner {
    padding: 0 0 18px;
    color: #444;
    font-size: 0.9em;
    line-height: 1.7;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 768px) {
    .ckpt-tab-nav__btn {
        padding: 10px 16px;
        font-size: 0.85em;
    }
}

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

    /* Let the tab bar scroll horizontally instead of wrapping */
    .ckpt-tab-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        /* hide scrollbar visually but keep it functional */
        scrollbar-width: none;
    }
    .ckpt-tab-nav::-webkit-scrollbar {
        display: none;
    }

    .ckpt-tab-nav__btn {
        padding: 10px 14px;
        font-size: 0.8em;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .ckpt-tab-panel {
        padding-top: 20px;
    }

    /* Stack table rows on very small screens */
    .ckpt-info-table,
    .ckpt-info-table tbody,
    .ckpt-info-table tr,
    .ckpt-info-table th,
    .ckpt-info-table td {
        display: block;
        width: 100%;
    }

    .ckpt-info-table tr {
        border-bottom: 1px solid #e0e0e0;
        padding: 8px 0;
    }

    .ckpt-info-table tr:first-child {
        border-top: 1px solid #e0e0e0;
    }

    .ckpt-info-table th,
    .ckpt-info-table td {
        border: none;
        padding: 2px 0;
    }

    .ckpt-info-table__label {
        width: 100%;
        white-space: normal;
        font-size: 0.8em;
        color: #666;
        font-weight: 600;
    }

    .ckpt-info-table__value {
        font-size: 0.95em;
    }

    .ckpt-faq-item__question {
        font-size: 0.9em !important;
        padding: 14px 0 !important;
    }
}