/* ========================================
   COOKIE CONSENT BANNER & MODAL
   DSGVO/GDPR compliant – German
   ======================================== */

/* --- Overlay --- */
.cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cc-overlay.cc-visible {
    opacity: 1;
    visibility: visible;
}

/* --- Banner --- */
.cc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: var(--color-white, #ffffff);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    border-top: 3px solid var(--color-primary, #b0956e);
    padding: 24px 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body, 'Inter', sans-serif);
}

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

.cc-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cc-banner-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text, #333333);
}

.cc-banner-text a {
    color: var(--color-primary, #b0956e);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cc-banner-text a:hover {
    color: var(--color-primary-dark, #967b58);
}

.cc-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* --- Buttons --- */
.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body, 'Inter', sans-serif);
    cursor: pointer;
    border: none;
    transition: var(--transition, all 0.3s ease);
    white-space: nowrap;
    line-height: 1.4;
}

.cc-btn-accept {
    background: var(--color-primary, #b0956e);
    color: var(--color-white, #ffffff);
}

.cc-btn-accept:hover {
    background: var(--color-primary-dark, #967b58);
}

.cc-btn-reject {
    background: var(--color-light, #f5f5f5);
    color: var(--color-text, #333333);
    border: 1px solid #ddd;
}

.cc-btn-reject:hover {
    background: #e8e8e8;
}

.cc-btn-settings {
    background: transparent;
    color: var(--color-text-light, #666666);
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 10px 12px;
}

.cc-btn-settings:hover {
    color: var(--color-primary, #b0956e);
}

/* --- Modal --- */
.cc-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 1000000;
    background: var(--color-white, #ffffff);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    font-family: var(--font-body, 'Inter', sans-serif);
}

.cc-modal.cc-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.cc-modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-modal-header h3 {
    font-family: var(--font-heading, 'Inter', sans-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark, #1a1a1a);
    margin: 0;
}

.cc-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-light, #666666);
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition, all 0.3s ease);
    line-height: 1;
}

.cc-modal-close:hover {
    background: var(--color-light, #f5f5f5);
    color: var(--color-dark, #1a1a1a);
}

.cc-modal-body {
    padding: 20px 24px;
}

.cc-modal-body p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text, #333333);
    margin-bottom: 20px;
}

/* --- Category --- */
.cc-category {
    background: var(--color-light, #f5f5f5);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.cc-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.cc-category-info {
    flex: 1;
}

.cc-category-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--color-dark, #1a1a1a);
}

.cc-category-desc {
    font-size: 13px;
    color: var(--color-text-light, #666666);
    margin-top: 4px;
    line-height: 1.5;
}

.cc-category-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary, #b0956e);
    background: rgba(176, 149, 110, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* --- Toggle Switch --- */
.cc-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

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

.cc-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--color-white, #ffffff);
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cc-toggle input:checked + .cc-toggle-slider {
    background: var(--color-primary, #b0956e);
}

.cc-toggle input:checked + .cc-toggle-slider::after {
    transform: translateX(20px);
}

.cc-toggle input:disabled + .cc-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Modal Footer --- */
.cc-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cc-modal-footer .cc-btn {
    flex: 1;
    min-width: 140px;
}

/* --- Reopen Link / Shortcode --- */
.cc-settings-link {
    cursor: pointer;
    color: var(--color-primary, #b0956e);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-size: inherit;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.cc-settings-link:hover {
    color: var(--color-primary-dark, #967b58);
}

/* --- Responsive --- */
@media (min-width: 768px) {
    .cc-banner-inner {
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }

    .cc-banner-text {
        flex: 1;
    }

    .cc-banner-actions {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .cc-banner {
        padding: 18px 16px;
    }

    .cc-banner-actions {
        flex-direction: column;
    }

    .cc-btn {
        width: 100%;
    }

    .cc-modal {
        width: 95%;
        max-height: 90vh;
    }

    .cc-modal-footer {
        flex-direction: column;
    }

    .cc-modal-footer .cc-btn {
        min-width: unset;
    }
}
