/* ── Chargentum Cookie Consent — Pixel-perfect Cookiebot match ── */

/* Overlay — Cookiebot uses body-level darkening, same rgba(0,0,0,0.7) */
#chg-cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    display: none;
}
#chg-cc-overlay.chg-cc-active { display: block; }

/* Dialog — border-radius:8px, exact Cookiebot shadow */
#chg-cc-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 32px 68px 0px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: none;
    flex-direction: column;
    z-index: 99999;
    font-family: sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    color: rgb(5, 28, 54);
    overflow: hidden;
}
#chg-cc-dialog.chg-cc-active { display: flex; }

/* ── Header — padding: 22.5px, flex, logos left + right ── */
#chg-cc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22.5px;
    flex-shrink: 0;
}
#chg-cc-logo { height: 32px; width: auto; }
#chg-cc-header-powered {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #9a9a9a;
    text-decoration: none;
}
#chg-cc-header-powered svg { width: 70px; opacity: 0.55; }

/* ── Nav tabs — exact Cookiebot border-bottom style ── */
#chg-cc-nav {
    display: flex;
    border-bottom: 1px solid rgb(214, 214, 214);
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}
.chg-cc-nav-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    padding: 15px;
    font-size: 15px;
    font-family: sans-serif;
    font-weight: 400;
    color: rgb(5, 28, 54);
    cursor: pointer;
    height: 57px;
    box-sizing: border-box;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    line-height: 24px;
}
.chg-cc-nav-btn:hover {
    color: rgb(164, 98, 49);
}
.chg-cc-nav-btn.chg-cc-active {
    border-bottom-color: rgb(164, 98, 49);
    color: rgb(164, 98, 49);
    font-weight: 600;
}

/* ── Tab content area ── */
#chg-cc-tabs {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.chg-cc-tab { display: none; }
.chg-cc-tab.chg-cc-active { display: block; }

/* ── Consent tab body ── */
#chg-cc-tab-consent {
    padding: 0;
}

/* Body content area — padding: 16.875px (~17px) */
#chg-cc-body-content {
    padding: 16.875px;
    padding-bottom: 0;
}

#chg-cc-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
    color: rgb(5, 28, 54);
    margin: 0 0 7.5px 0;
    padding: 0;
}
#chg-cc-body-text {
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    color: rgb(5, 28, 54);
    margin: 0;
    padding: 0;
}

/* ── Category toggles — exact Cookiebot layout ── */
#chg-cc-categories {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-top: 1px solid rgb(214, 214, 214);
    margin-top: 16.875px;
}
.chg-cc-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 22.5px 15px;
    flex: 1;
    border-right: 1px solid rgb(214, 214, 214);
    min-width: 0;
}
.chg-cc-category:last-child { border-right: none; }

/* Toggle — width:57px height:32px border-radius:32px (exact Cookiebot) */
.chg-cc-toggle {
    position: relative;
    width: 57px;
    height: 32px;
    flex-shrink: 0;
    display: block;
    cursor: pointer;
}
.chg-cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.chg-cc-toggle-track {
    position: absolute;
    inset: 0;
    background: rgb(214, 214, 214);
    border-radius: 32px;
    transition: background 0.2s;
}
.chg-cc-toggle-track::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.chg-cc-toggle input:checked + .chg-cc-toggle-track {
    background: rgb(164, 98, 49);
}
.chg-cc-toggle input:checked + .chg-cc-toggle-track::after {
    transform: translateX(25px);
}
.chg-cc-toggle input:disabled + .chg-cc-toggle-track {
    cursor: not-allowed;
}

.chg-cc-category-label {
    font-size: 15px;
    font-weight: 700;
    color: rgb(5, 28, 54);
    text-align: center;
    margin: 0;
    line-height: 24px;
}

/* ── Buttons — exact Cookiebot sizing ── */
#chg-cc-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16.875px;
    gap: 0;
    flex-shrink: 0;
    border-top: 1px solid rgb(214, 214, 214);
    background: #fff;
}
.chg-cc-btn {
    flex: 1;
    height: 49px;
    padding: 15px;
    font-size: 15px;
    font-family: sans-serif;
    font-weight: 600;
    border-radius: 3.75px;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
    line-height: 15px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
    transition: opacity 0.15s;
}
.chg-cc-btn:hover { opacity: 0.88; }
.chg-cc-btn-outline {
    background: rgb(255, 255, 255);
    color: rgb(5, 28, 54);
    border: 2px solid rgb(164, 98, 49);
    margin-right: 7.5px;
}
.chg-cc-btn-outline:last-of-type { margin-right: 7.5px; }
.chg-cc-btn-primary {
    background: rgb(164, 98, 49);
    color: rgb(255, 255, 255);
    border: 2px solid rgb(255, 255, 255);
    margin-right: 0;
}

/* ── Details tab ── */
#chg-cc-tab-details { padding: 16.875px; }
#chg-cc-details-intro {
    font-size: 15px;
    color: rgb(5, 28, 54);
    margin: 0 0 16px;
    line-height: 24px;
}
.chg-cc-details-section {
    border: 1px solid rgb(214, 214, 214);
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
}
.chg-cc-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    background: rgb(248, 248, 248);
    user-select: none;
    gap: 12px;
}
.chg-cc-details-header:hover { background: rgb(240, 240, 240); }
.chg-cc-details-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.chg-cc-details-title {
    font-size: 15px;
    font-weight: 600;
    color: rgb(5, 28, 54);
}
.chg-cc-details-count {
    font-size: 13px;
    color: #888;
}
.chg-cc-details-arrow {
    font-size: 11px;
    color: #888;
    transition: transform 0.2s;
    display: inline-block;
}
.chg-cc-details-section.open .chg-cc-details-arrow {
    transform: rotate(180deg);
}
.chg-cc-details-body {
    display: none;
    padding: 14px 16px;
    border-top: 1px solid rgb(214, 214, 214);
    background: #fff;
}
.chg-cc-details-section.open .chg-cc-details-body { display: block; }
.chg-cc-details-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.55;
    margin: 0 0 12px;
}
.chg-cc-cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.chg-cc-cookie-table th {
    text-align: left;
    padding: 7px 10px;
    background: rgb(248, 248, 248);
    color: rgb(5, 28, 54);
    font-weight: 600;
    border-bottom: 1px solid rgb(214, 214, 214);
}
.chg-cc-cookie-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgb(235, 235, 235);
    color: #444;
    vertical-align: top;
    font-size: 13px;
}
.chg-cc-cookie-table tr:last-child td { border-bottom: none; }

/* Small toggle inside details header */
.chg-cc-details-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    display: block;
    cursor: pointer;
}
.chg-cc-details-toggle input {
    opacity: 0; width: 0; height: 0; position: absolute;
}
.chg-cc-details-toggle-track {
    position: absolute;
    inset: 0;
    background: rgb(214, 214, 214);
    border-radius: 24px;
    transition: background 0.2s;
}
.chg-cc-details-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.chg-cc-details-toggle input:checked + .chg-cc-details-toggle-track { background: rgb(164, 98, 49); }
.chg-cc-details-toggle input:checked + .chg-cc-details-toggle-track::after { transform: translateX(20px); }
.chg-cc-details-toggle input:disabled + .chg-cc-details-toggle-track { cursor: not-allowed; }

/* ── About tab ── */
#chg-cc-tab-about { padding: 16.875px; }
#chg-cc-about { font-size: 15px; line-height: 24px; color: rgb(5, 28, 54); }
#chg-cc-about p { margin: 0 0 16px; }
#chg-cc-about a { color: rgb(164, 98, 49); text-decoration: none; }
#chg-cc-about a:hover { text-decoration: underline; }

/* ── Floating widget ── */
#chg-cc-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99990;
    background: rgb(5, 28, 54);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 4px 12px 0px;
    transition: background 0.15s;
    padding: 0;
}
#chg-cc-widget:hover { background: rgb(164, 98, 49); }
#chg-cc-widget svg { width: 22px; height: 22px; }
#chg-cc-widget.chg-cc-visible { display: flex; }

/* ── Responsive ── */
@media (max-width: 600px) {
    #chg-cc-dialog { width: 96%; max-height: 96vh; border-radius: 6px; }
    #chg-cc-header { padding: 16px; }
    #chg-cc-categories { flex-wrap: wrap; }
    .chg-cc-category { min-width: 45%; border-right: none; border-bottom: 1px solid rgb(214,214,214); }
    .chg-cc-category:nth-child(odd) { border-right: 1px solid rgb(214,214,214); }
    .chg-cc-category:last-child, .chg-cc-category:nth-last-child(2):nth-child(odd) { border-bottom: none; }
    #chg-cc-buttons { flex-direction: column; gap: 8px; }
    .chg-cc-btn { width: 100%; margin-right: 0 !important; }
    #chg-cc-body-content, #chg-cc-tab-details, #chg-cc-tab-about { padding: 14px; }
}
