/* =====================================================
   Cookie Consent Plugin — CSS Styles
   v2.0 | 18.07.2026
   ===================================================== */

/* === CSS Variables === */
:root {
    --cc-bg: #ffffff;
    --cc-text: #222222;
    --cc-primary: #ff6600;
    --cc-primary-hover: #7f3300;
    --cc-secondary: #6b7280;
    --cc-border: #e5e7eb;
    --cc-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --cc-radius: 12px;
    --cc-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === Base Overlay === */
.cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cc-overlay.cc-visible {
    opacity: 1;
    pointer-events: auto;
}

/* === Cookie Banner === */
.cc-banner {
    position: fixed;
    z-index: 9999;
    font-family: var(--cc-font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--cc-text);
    background: var(--cc-bg);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    max-height: 90vh;
    padding: 24px 28px;
    max-width: 480px;
    width: calc(100% - 32px);
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    display: none;
    overflow-y: auto;
}

.cc-banner.cc-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    display: block;
}

.cc-banner.cc-hidden {
    display: none !important;
}

/* Positions */
.cc-banner.cc-position--bottom-left {
    bottom: 24px;
    left: 24px;
}

.cc-banner.cc-position--bottom-right {
    bottom: 24px;
    right: 24px;
}

.cc-banner.cc-position--bottom-center {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.98);
}

.cc-banner.cc-position--bottom-center.cc-visible {
    transform: translateX(-50%) translateY(0) scale(1);
}

.cc-banner.cc-position--center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(20px) scale(0.98);
}

.cc-banner.cc-position--center.cc-visible {
    transform: translate(-50%, -50%) translateY(0) scale(1);
}

/* === Banner Header === */
.cc-banner__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cc-banner__title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-banner__title svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.cc-banner__close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--cc-secondary);
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    _display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.cc-banner__close:hover {
    background: #f3f4f6;
    color: var(--cc-text);
}

.cc-banner__close svg {
    width: 18px;
    height: 18px;
}

/* === Banner Description === */
.cc-banner__desc {
    color: #4b5563;
    margin-bottom: 18px;
    font-size: 11pt;
}

.cc-banner__desc a {
    color: var(--cc-primary);
    text-decoration: none;
}

.cc-banner__desc a:hover {
    text-decoration: underline;
}

/* === Cookie Categories === */
.cc-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.cc-category {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid var(--cc-border);
    transition: background 0.2s;
}

.cc-category.cc-category--disabled {
    opacity: 0.55;
}

.cc-category__toggle {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 1px;
}

.cc-category__toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cc-category__toggle .cc-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: background 0.3s;
}

.cc-category__toggle .cc-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cc-category__toggle input:checked + .cc-slider {
    background: var(--cc-primary);
}

.cc-category__toggle input:checked + .cc-slider::before {
    transform: translateX(18px);
}

.cc-category__toggle input:focus-visible + .cc-slider {
    outline: 2px solid var(--cc-primary);
    outline-offset: 2px;
}

.cc-category__info {
    flex: 1;
    min-width: 0;
}

.cc-category__name {
    font-weight: 600;
    font-size: 13px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.cc-category__badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.cc-category__badge--essential {
    background: #dcfce7;
    color: #166534;
}

.cc-category__badge--optional {
    background: #fef3c7;
    color: #92400e;
}

.cc-category__desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

/* === Banner Actions === */
.cc-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cc-btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    font-family: inherit;
}

.cc-btn:active {
    transform: scale(0.97);
}

.cc-btn--primary {
    background: var(--cc-primary);
    color: white;
    flex: 1;
}

.cc-btn--primary:hover {
    background: var(--cc-primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.cc-btn--secondary {
    background: #f3f4f6;
    color: #374151;
    opacity: 0.4;
}

.cc-btn--secondary:hover {
    background: #e5e7eb;
}

.cc-btn--outline {
    background: transparent;
    color: var(--cc-primary);
    border: 1.5px solid var(--cc-primary);
    padding: 9px 17px;
    opacity: 0.4;
}

.cc-btn--outline:hover {
    background: #eff6ff;
}

/* === Footer Link === */
.cc-footer-link {
    margin-top: 14px;
    text-align: center;
}

.cc-footer-link button {
    background: none;
    border: none;
    color: var(--cc-secondary);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    padding: 0;
}

.cc-footer-link button:hover {
    color: var(--cc-text);
}

/* === Preferences Panel === */
.cc-preferences {
    display: none;
}

.cc-preferences.cc-visible {
    display: block;
}

/* Banner inner sections */
#cc-banner-main {
    display: block;
}

#cc-banner-main.cc-hidden {
    display: none !important;
}

/* Hidden utility */
.cc-hidden {
    display: none !important;
}

.cc-preferences__title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cc-border);
}

.cc-preferences__back {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--cc-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
    font-family: inherit;
}

.cc-preferences__back:hover {
    text-decoration: underline;
}

.cc-preferences__back svg {
    width: 16px;
    height: 16px;
}

.cc-preferences__actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--cc-border);
}

.cc-preferences__actions .cc-btn {
    width: 100%;
}

/* === Responsive === */
@media (max-width: 520px) {
    /* Prevent body scroll when banner is open */
    body.cc-overlay-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .cc-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cc-banner {
        padding: 20px;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: calc(100% - 10px);
        width: 100%;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        margin: 5px;
    }

    /* Reset position classes for mobile — always bottom fullwidth */
    .cc-banner.cc-position--bottom-left,
    .cc-banner.cc-position--bottom-right,
    .cc-banner.cc-position--bottom-center {
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        transform: translateY(100%);
    }

    .cc-banner.cc-position--bottom-left.cc-visible,
    .cc-banner.cc-position--bottom-right.cc-visible,
    .cc-banner.cc-position--bottom-center.cc-visible {
        transform: translateY(0);
    }

    .cc-banner.cc-position--center {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        max-width: none;
        border-radius: 16px 16px 0 0;
    }

    .cc-banner.cc-position--center.cc-visible {
        transform: translateY(0);
    }

    .cc-banner__actions {
        flex-direction: column;
        gap: 8px;
    }

    .cc-btn {
        width: 100%;
        text-align: center;
        padding: 14px 18px;
        font-size: 14px;
    }

    .cc-preferences__back {
        padding: 8px 0;
    }

    .cc-preferences__actions .cc-btn {
        padding: 14px 18px;
    }
}