/*
 Cookie bar — two-layer flat design
*/

/* ---- Reset ---- */
.cookie-bar-wrap *,
.cookie-bar-wrap *::before,
.cookie-bar-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---- Wrapper ---- */
.cookie-bar-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2147483647;
    padding: 12px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #1d1d1f;
    overflow: hidden;
    max-width: 100vw;
}

.cookie-bar-wrap.hidden {
    display: none;
}

.cb-hidden {
    display: none !important;
}

/* ---- Card ---- */
.cookie-bar-wrap .cb-card {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5e5e7;
    border-radius: 12px;
    box-shadow: 0 -1px 12px rgba(0, 0, 0, 0.06);
    padding: 20px 24px;
    max-height: 85vh;
    overflow-y: auto;
}

.cookie-bar-wrap .cb-card::-webkit-scrollbar {
    width: 4px;
}

.cookie-bar-wrap .cb-card::-webkit-scrollbar-thumb {
    background: #d1d1d6;
    border-radius: 4px;
}

/* ---- Close button ---- */
.cookie-bar-wrap .cb-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #86868b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.cookie-bar-wrap .cb-close:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}

/* ---- Layer shared ---- */
.cookie-bar-wrap .cb-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 6px 0;
}

.cookie-bar-wrap .cb-desc {
    font-size: 12px;
    color: #6e6e73;
    margin: 0 0 16px 0;
    line-height: 1.6;
    padding-right: 28px;
}

.cookie-bar-wrap .cb-desc a {
    color: #1d1d1f;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---- Footer buttons — all identical per regulator ---- */
.cookie-bar-wrap .cb-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cookie-bar-wrap .cb-footer-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cookie-bar-wrap .cb-btn {
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    background: #1d1d1f;
    border: 1px solid #1d1d1f;
    color: #fff;
    transition: background-color 0.15s;
    min-width: 0;
}

.cookie-bar-wrap .cb-btn:hover {
    background: #333;
}

/* ---- Layer 2: Back button ---- */
.cookie-bar-wrap .cb-layer2-header {
    margin-bottom: 12px;
}

.cookie-bar-wrap .cb-back {
    background: none;
    border: none;
    color: #6e6e73;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 4px;
}

.cookie-bar-wrap .cb-back:hover {
    color: #1d1d1f;
}

/* ---- Category items ---- */
.cookie-bar-wrap .cb-categories {
    margin-bottom: 12px;
}

.cookie-bar-wrap .cb-category {
    border: 1px solid #e5e5e7;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

.cookie-bar-wrap .cb-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cookie-bar-wrap .cb-category-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.cookie-bar-wrap .cb-category-title {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
}

.cookie-bar-wrap .cb-category-desc {
    font-size: 11px;
    color: #86868b;
    line-height: 1.4;
    margin-top: 2px;
}

/* ---- Toggle switch ---- */
.cookie-bar-wrap .cb-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    min-width: 36px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-bar-wrap .cb-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-bar-wrap .cb-switch-track {
    position: absolute;
    inset: 0;
    background: #d1d1d6;
    border-radius: 20px;
    transition: background-color 0.2s;
}

.cookie-bar-wrap .cb-switch-track::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.cookie-bar-wrap .cb-switch-input:checked + .cb-switch-track {
    background: #1d1d1f;
}

.cookie-bar-wrap .cb-switch-input:checked + .cb-switch-track::before {
    transform: translateX(16px);
}

.cookie-bar-wrap .cb-switch-input:disabled + .cb-switch-track {
    cursor: not-allowed;
}

/* ---- Services list (collapsible per category) ---- */
.cookie-bar-wrap .cb-services {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f2;
}

.cookie-bar-wrap .cb-services-toggle,
.cookie-bar-wrap .cb-domains-toggle {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    color: #6e6e73;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-bar-wrap .cb-services-toggle:hover,
.cookie-bar-wrap .cb-domains-toggle:hover {
    color: #1d1d1f;
}

.cookie-bar-wrap .cb-chevron {
    display: inline-block;
    width: 6px;
    height: 6px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    transition: transform 0.2s;
}

.cookie-bar-wrap .cb-chevron--open {
    transform: rotate(-135deg);
}

.cookie-bar-wrap .cb-services-list,
.cookie-bar-wrap .cb-domains-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.cookie-bar-wrap .cb-domains-list {
    margin-top: 12px;
}

.cookie-bar-wrap .cb-domains-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
}

.cookie-bar-wrap .cb-domains-header {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.cookie-bar-wrap .cb-domains-title {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
}

.cookie-bar-wrap .cb-domains-note {
    font-size: 11px;
    color: #86868b;
    line-height: 1.4;
    margin-top: 2px;
}


.cookie-bar-wrap .cb-service-item,
.cookie-bar-wrap .cb-domain-item {
    font-size: 10px;
    color: #6e6e73;
    background: #f5f5f7;
    padding: 2px 8px;
    border-radius: 4px;
}

.cookie-bar-wrap a.cb-domain-item {
    text-decoration: none;
}

.cookie-bar-wrap a.cb-domain-item:hover {
    background: #e8e8ec;
    color: #1d1d1f;
}

/* ---- Services detailed table ---- */
.cookie-bar-wrap .cb-services-list--table {
    display: block;
    overflow-x: auto;
}

.cookie-bar-wrap .cb-services-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
    color: #3c3c43;
}

.cookie-bar-wrap .cb-services-table th {
    text-align: left;
    font-weight: 600;
    color: #6e6e73;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 9px;
    padding: 4px 6px;
    border-bottom: 1px solid #e5e5e7;
    background: #fafafc;
}

.cookie-bar-wrap .cb-services-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #f0f0f2;
    vertical-align: top;
    word-break: break-word;
}

.cookie-bar-wrap .cb-services-table th:nth-child(1),
.cookie-bar-wrap .cb-services-table td:nth-child(1),
.cookie-bar-wrap .cb-services-table th:nth-child(2),
.cookie-bar-wrap .cb-services-table td:nth-child(2) {
    white-space: nowrap;
    width: 1%;
}

.cookie-bar-wrap .cb-services-table tr:last-child td {
    border-bottom: none;
}

/* ---- Domains section ---- */
.cookie-bar-wrap .cb-domains {
    margin-bottom: 10px;
    padding: 10px 14px;
    border: 1px solid #e5e5e7;
    border-radius: 8px;
}

/* ---- Legal notice ---- */
.cookie-bar-wrap .cb-legal {
    margin-bottom: 14px;
}

.cookie-bar-wrap .cb-consent-notice {
    font-size: 10px;
    color: #86868b;
    line-height: 1.5;
    margin: 0;
}

.cookie-bar-wrap .cb-controller {
    font-size: 10px;
    color: #86868b;
    margin: 2px 0 0 0;
}

.cookie-bar-wrap .cb-controller span::after {
    content: " \00b7 ";
    color: #c7c7cc;
}

.cookie-bar-wrap .cb-controller span:last-child::after {
    content: "";
}

.cookie-bar-wrap .cb-controller a {
    color: #86868b;
    text-decoration: underline;
}

/* ---- Reopen button ---- */
.cookie-settings-reopen {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 2147483647;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1d1d1f;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background-color 0.15s;
    padding: 0;
}

.cookie-settings-reopen:hover {
    background: #333;
}

.cookie-settings-reopen svg {
    width: 20px;
    height: 20px;
}

/* =======================================
   Responsive — Bootstrap breakpoints
   xl: 1200px, lg: 992px, md: 768px, sm: 576px, xs: <576px
   ======================================= */

/* -- XL & below (≤1199.98px) -- */
@media (max-width: 1199.98px) {
    .cookie-bar-wrap .cb-card {
        max-width: 680px;
    }
}

/* -- LG & below (≤991.98px) — tablets landscape -- */
@media (max-width: 991.98px) {
    .cookie-bar-wrap .cb-card {
        max-width: 600px;
    }

    .cookie-bar-wrap .cb-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* -- MD & below (≤767.98px) — tablets portrait -- */
@media (max-width: 767.98px) {
    .cookie-bar-wrap {
        padding: 8px 10px;
    }

    .cookie-bar-wrap .cb-card {
        max-width: 100%;
        border-radius: 10px;
        padding: 16px 18px;
        max-height: 80vh;
    }

    .cookie-bar-wrap .cb-title {
        font-size: 13px;
    }

    .cookie-bar-wrap .cb-desc {
        font-size: 11px;
        margin-bottom: 12px;
        padding-right: 24px;
    }

    .cookie-bar-wrap .cb-category {
        padding: 10px 12px;
    }

    .cookie-bar-wrap .cb-category-title {
        font-size: 12px;
    }

    .cookie-bar-wrap .cb-category-desc {
        font-size: 10px;
    }

    .cookie-bar-wrap .cb-legal {
        margin-bottom: 10px;
    }

    .cookie-bar-wrap .cb-footer {
        gap: 6px;
    }

    .cookie-bar-wrap .cb-footer-right {
        gap: 6px;
    }

    .cookie-bar-wrap .cb-btn {
        padding: 7px 14px;
        font-size: 11px;
    }

    .cookie-settings-reopen {
        width: 36px;
        height: 36px;
        bottom: 12px;
        left: 12px;
    }

    .cookie-settings-reopen svg {
        width: 18px;
        height: 18px;
    }
}

/* -- SM & below (≤575.98px) — phones landscape -- */
@media (max-width: 575.98px) {
    .cookie-bar-wrap {
        padding: 4px 6px;
    }

    .cookie-bar-wrap .cb-card {
        border-radius: 8px;
        padding: 14px 12px;
        max-height: 75vh;
        max-width: calc(100vw - 12px);
    }

    .cookie-bar-wrap .cb-close {
        top: 8px;
        right: 8px;
        font-size: 18px;
        padding: 2px 6px;
    }

    .cookie-bar-wrap .cb-title {
        font-size: 13px;
        padding-right: 20px;
    }

    .cookie-bar-wrap .cb-desc {
        font-size: 11px;
        line-height: 1.5;
        padding-right: 20px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .cookie-bar-wrap .cb-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-bar-wrap .cb-footer-right {
        width: 100%;
        flex-direction: column;
    }

    .cookie-bar-wrap .cb-btn {
        width: 100%;
        text-align: center;
        padding: 9px 14px;
        font-size: 12px;
        white-space: normal;
    }

    .cookie-bar-wrap .cb-category {
        padding: 10px 10px;
        margin-bottom: 6px;
    }

    .cookie-bar-wrap .cb-category-desc {
        display: none;
    }

    .cookie-bar-wrap .cb-services {
        margin-top: 6px;
        padding-top: 6px;
    }

    .cookie-bar-wrap .cb-services-list,
    .cookie-bar-wrap .cb-domains-list {
        gap: 3px;
    }

    .cookie-bar-wrap .cb-consent-notice {
        font-size: 9px;
        word-wrap: break-word;
    }

    .cookie-bar-wrap .cb-controller {
        font-size: 9px;
    }

    .cookie-bar-wrap .cb-back {
        font-size: 11px;
    }

    .cookie-bar-wrap .cb-domains {
        padding: 8px 10px;
    }
}

/* -- XS (≤399.98px) — small phones -- */
@media (max-width: 399.98px) {
    .cookie-bar-wrap {
        padding: 2px 4px;
    }

    .cookie-bar-wrap .cb-card {
        padding: 12px 10px;
        max-height: 70vh;
        max-width: calc(100vw - 8px);
        border-radius: 6px;
    }

    .cookie-bar-wrap .cb-category-header {
        gap: 8px;
    }

    .cookie-bar-wrap .cb-switch {
        width: 32px;
        min-width: 32px;
        height: 18px;
    }

    .cookie-bar-wrap .cb-switch-track::before {
        width: 12px;
        height: 12px;
    }

    .cookie-bar-wrap .cb-switch-input:checked + .cb-switch-track::before {
        transform: translateX(14px);
    }

    .cookie-bar-wrap .cb-service-item,
    .cookie-bar-wrap .cb-domain-item {
        font-size: 9px;
        padding: 1px 6px;
    }
}
