:root {
    --cte-cookie-bg: #ffffff;
    --cte-cookie-text: #252525;
    --cte-cookie-muted: #666666;
    --cte-cookie-border: #e5e7eb;
    --cte-cookie-primary: #5bc0be;
    --cte-cookie-primary-hover: #6dc7c5;
    --cte-cookie-secondary: #3a506b;
    --cte-cookie-shadow: 0 8px 30px rgba(15, 23, 42, 0.16);
}

.cte-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.cte-cookie-banner.is-open {
    display: block;
}

.cte-cookie-banner__inner {
    margin: 0 auto;
    max-width: 1200px;
}

.cte-cookie-banner__content {
    background: var(--cte-cookie-bg);
    border: 1px solid var(--cte-cookie-border);
    border-radius: 10px;
    box-shadow: var(--cte-cookie-shadow);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cte-cookie-banner__title {
    margin: 0 0 6px;
    color: var(--cte-cookie-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.cte-cookie-banner__text {
    margin: 0;
    color: var(--cte-cookie-muted);
    font-size: 14px;
    line-height: 1.45;
}

.cte-cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cte-cookie-btn {
    appearance: none;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    min-height: 40px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.cte-cookie-btn:focus-visible {
    outline: 2px solid var(--cte-cookie-secondary);
    outline-offset: 2px;
}

.cte-cookie-btn:hover {
    transform: translateY(-1px);
}

.cte-cookie-btn--accept,
.cte-cookie-btn--save {
    background: var(--cte-cookie-primary);
    border-color: var(--cte-cookie-primary);
    color: #153233;
}

.cte-cookie-btn--accept:hover,
.cte-cookie-btn--save:hover {
    background: var(--cte-cookie-primary-hover);
    border-color: var(--cte-cookie-primary-hover);
}

.cte-cookie-btn--manage,
.cte-cookie-btn--cancel {
    background: #ffffff;
    border-color: var(--cte-cookie-secondary);
    color: var(--cte-cookie-secondary);
}

.cte-cookie-btn--manage:hover,
.cte-cookie-btn--cancel:hover {
    background: #f8fafc;
}

.cte-cookie-btn--reject {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}

.cte-cookie-btn--reject:hover {
    background: #f8fafc;
}

.cte-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.5);
    padding: 20px;
}

.cte-cookie-modal.is-open {
    display: flex;
}

.cte-cookie-modal__content {
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--cte-cookie-border);
    border-radius: 12px;
    box-shadow: var(--cte-cookie-shadow);
    overflow: hidden;
}

.cte-cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 18px 20px 10px;
}

.cte-cookie-modal__header h3 {
    margin: 0;
    color: var(--cte-cookie-text);
    font-size: 20px;
    line-height: 1.2;
}

.cte-cookie-modal__description {
    margin: 0;
    padding: 0 20px 12px;
    color: var(--cte-cookie-muted);
    font-size: 14px;
    line-height: 1.45;
}

.cte-cookie-modal__body {
    overflow-y: auto;
    padding: 0 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cte-cookie-modal__option {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cte-cookie-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    padding: 11px 0;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
}

.cte-cookie-modal__option input[type="checkbox"] {
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: auto;
    display: inline-block;
    width: 16px;
    min-width: 16px;
    max-width: 16px;
    height: 16px;
    min-height: 16px;
    max-height: 16px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    vertical-align: middle;
    flex: 0 0 16px;
}

.cte-cookie-modal__option:last-child {
    border-bottom: 0;
}

.cte-cookie-modal__option--locked {
    color: #334155;
}

.cte-cookie-modal__option--locked input {
    cursor: not-allowed;
}

.cte-cookie-modal__actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    border-top: 1px solid var(--cte-cookie-border);
    background: #ffffff;
    padding: 12px 20px 18px;
}

.cte-cookie-feedback {
    position: fixed;
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    background: #0f172a;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.2;
    z-index: 100001;
    box-shadow: var(--cte-cookie-shadow);
}

body.cte-cookie-modal-open {
    overflow: hidden;
}

.cte-legal-links {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

.cte-legal-links a,
.cte-legal-links .type--fine-print {
    white-space: nowrap;
}

.content-footer .footer-name a {
    color: rgba(255, 255, 255, 0.88);
}

.content-footer .footer-name a:hover {
    color: #ffffff;
}

.content-footer .footer-name small {
    color: rgba(255, 255, 255, 0.75);
}

.cte-admin-footer-name {
    font-size: 12px;
    line-height: 1.4;
}

.cte-admin-footer-name a,
.cte-admin-footer-name span,
.cte-admin-footer-name small {
    font-size: 12px;
}

.cte-admin-footer-name__pipe {
    display: inline-block;
    margin: 0 14px;
    color: rgba(255, 255, 255, 0.7);
}

.cte-admin-footer-name__version {
    display: inline-block;
}

.cte-admin-legal-links {
    gap: 14px;
    vertical-align: middle;
}

.cte-login-legal {
    justify-content: center;
    margin: 14px auto 0;
    padding: 0 12px;
    font-size: 12px;
    line-height: 1.4;
    position: relative;
    z-index: 5;
}

.cte-login-legal a {
    color: #64748b;
}

.cte-login-legal a:hover {
    color: #334155;
}

@media (min-width: 768px) {
    .cte-cookie-banner__content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        border: 2px solid var(--cte-cookie-primary);
        background: linear-gradient(90deg, #ecfeff 0%, #ffffff 36%);
    }

    .cte-cookie-banner__text-block {
        flex: 1;
    }

    .cte-cookie-banner__actions {
        justify-content: flex-end;
        flex-shrink: 0;
    }
}

@media (max-width: 991px) {
    .cte-cookie-banner {
        padding: 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .cte-cookie-banner__actions {
        width: 100%;
    }

    .cte-cookie-btn {
        min-height: 44px;
        font-size: 14px;
    }

    .cte-cookie-feedback {
        right: 10px;
        left: 10px;
        bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    }

    .cte-legal-links {
        gap: 5px;
    }

    .cte-admin-legal-links {
        gap: 10px;
    }

    .cte-admin-footer-name__pipe {
        margin: 0 10px;
    }
}

@media (max-width: 767px) {
    .cte-cookie-banner__actions {
        flex-direction: column;
    }

    .cte-cookie-btn {
        width: 100%;
    }

    .cte-cookie-modal {
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }

    .cte-cookie-modal__content {
        width: 100%;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
        border-bottom: 0;
    }

    .cte-cookie-modal__actions {
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        flex-direction: row;
    }

    .cte-legal-links {
        display: flex;
        justify-content: flex-start;
        column-gap: 8px;
        row-gap: 4px;
        flex-wrap: wrap;
        text-align: left;
    }

    .cte-login-legal {
        justify-content: flex-start;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .cte-admin-footer-name--mobile {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        row-gap: 4px;
    }

    .cte-admin-footer-name--mobile .cte-admin-legal-links {
        justify-content: center;
        gap: 8px;
    }

    .cte-admin-footer-name--mobile .cte-admin-footer-name__pipe {
        margin: 0 6px;
    }
}
