/* Cookie Consent - CookieBot-style Tabbed Modal */

/* ─── Modal Overlay ──────────────────────────────────────────────────────── */

.jt-cc__modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.jt-cc__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
}

/* ─── Dialog ─────────────────────────────────────────────────────────────── */

.jt-cc__dialog {
    position: relative;
    background-color: #fff;
    border-radius: 4px;
    max-width: 660px;
    width: 92%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* ─── Logo Row ───────────────────────────────────────────────────────────── */

.jt-cc__logo-row {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px 0;
}

.jt-cc__logo {
    height: 28px;
    width: auto;
}

/* ─── Tab Navigation ─────────────────────────────────────────────────────── */

.jt-cc__tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 24px;
}

.jt-cc__tab {
    flex: 1;
    padding: 14px 0;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    text-align: center;
    transition: color 0.2s, border-color 0.2s;
    font-family: inherit;
}

.jt-cc__tab:hover {
    color: #333;
}

.jt-cc__tab--active {
    color: #265CFF;
    border-bottom-color: #265CFF;
    font-weight: 600;
}

/* ─── Tab Panels ─────────────────────────────────────────────────────────── */

.jt-cc__panel {
    display: none;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.jt-cc__panel--active {
    display: block;
}

.jt-cc__panel-body {
    padding: 20px 24px;
}

.jt-cc__heading {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.jt-cc__text {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 12px;
}

.jt-cc__text a {
    color: #265CFF;
    text-decoration: underline;
}

.jt-cc__text a:hover {
    color: #113DD9;
}

/* ─── Consent Tab Toggles (inline row) ───────────────────────────────────── */

.jt-cc__consent-toggles {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-top: 16px;
}

.jt-cc__consent-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border-right: 1px solid #e0e0e0;
}

.jt-cc__consent-item:last-child {
    border-right: none;
}

.jt-cc__consent-label {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
}

/* ─── Details Tab Categories ─────────────────────────────────────────────── */

.jt-cc__category {
    border-bottom: 1px solid #e8e8e8;
    padding: 16px 0;
}

.jt-cc__category:first-child {
    padding-top: 0;
}

.jt-cc__category:last-child {
    border-bottom: none;
}

.jt-cc__category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jt-cc__category-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.jt-cc__category-desc {
    font-size: 13px;
    color: #777;
    margin: 10px 0 0;
    line-height: 1.5;
}

/* ─── Toggle Switch ──────────────────────────────────────────────────────── */

.jt-cc__toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.jt-cc__toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.jt-cc__toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.2s;
}

.jt-cc__toggle-slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.jt-cc__toggle input:checked + .jt-cc__toggle-slider {
    background-color: #1a1a1a;
}

.jt-cc__toggle input:checked + .jt-cc__toggle-slider:before {
    transform: translateX(20px);
}

.jt-cc__toggle input:disabled + .jt-cc__toggle-slider {
    cursor: default;
}

/* ─── Sticky Footer ──────────────────────────────────────────────────────── */

.jt-cc__footer {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    background: #fff;
    flex-shrink: 0;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.jt-cc__btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1.4;
    font-family: inherit;
}

.jt-cc__btn--primary {
    background-color: #113DD9;
    border-color: #113DD9;
    color: #fff;
}

.jt-cc__btn--primary:hover {
    background-color: #0D2FA6;
    border-color: #0D2FA6;
}

.jt-cc__btn--outline {
    background-color: #fff;
    border-color: #113DD9;
    color: #113DD9;
}

.jt-cc__btn--outline:hover {
    background-color: #f5f7ff;
}

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

@media (max-width: 580px) {
    .jt-cc__dialog {
        width: 96%;
        max-height: 92vh;
        border-radius: 8px;
    }

    .jt-cc__consent-toggles {
        flex-wrap: wrap;
    }

    .jt-cc__consent-item {
        flex: 1 1 45%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 12px 8px;
    }

    .jt-cc__consent-item:nth-child(odd) {
        border-right: 1px solid #e0e0e0;
    }

    .jt-cc__consent-item:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .jt-cc__footer {
        flex-direction: column;
        gap: 6px;
    }

    .jt-cc__panel-body {
        padding: 16px 20px;
    }

    .jt-cc__tabs {
        padding: 0 16px;
    }

    .jt-cc__footer {
        padding: 12px 16px;
    }
}
