/**
 * Cookie Consent Styling
 * Heisse Spinne Werbung - DSGVO-konform
 */

/* ============================
   COOKIE BANNER (Fixed Bottom)
   ============================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white, #ffffff);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 1.5rem;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    margin: 0 0 0.5rem 0;
    font-family: var(--font-main, 'Arial', sans-serif);
    font-size: 1.25rem;
    color: #1a1a1a;
}

.cookie-banner-text p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

.cookie-banner-text a {
    color: var(--primary-red, #c41e3a);
    text-decoration: underline;
}

.cookie-banner-text a:hover {
    color: #a01828;
}

.cookie-banner-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* ============================
   COOKIE BUTTONS
   ============================ */

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-family: var(--font-main, 'Arial', sans-serif);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: var(--primary-red, #c41e3a);
    color: white;
}

.cookie-btn-primary:hover {
    background: #a01828;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.cookie-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.cookie-btn-secondary:hover {
    background: #e0e0e0;
}

.cookie-btn-settings {
    background: transparent;
    color: var(--primary-red, #c41e3a);
    border: 2px solid var(--primary-red, #c41e3a);
}

.cookie-btn-settings:hover {
    background: var(--primary-red, #c41e3a);
    color: white;
}

/* ============================
   COOKIE SETTINGS MODAL
   ============================ */

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.cookie-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-header h2 {
    margin: 0;
    font-family: var(--font-main, 'Arial', sans-serif);
    font-size: 1.5rem;
    color: #1a1a1a;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.cookie-modal-close:hover {
    color: var(--primary-red, #c41e3a);
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-body>p {
    margin: 0 0 1.5rem 0;
    color: #555;
    line-height: 1.6;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ============================
   COOKIE CATEGORIES
   ============================ */

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h3 {
    margin: 0 0 0.5rem 0;
    font-family: var(--font-main, 'Arial', sans-serif);
    font-size: 1.1rem;
    color: #1a1a1a;
}

.cookie-category-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* ============================
   TOGGLE SWITCH
   ============================ */

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-switch input:checked+.cookie-slider {
    background-color: var(--primary-red, #c41e3a);
}

.cookie-switch input:checked+.cookie-slider:before {
    transform: translateX(24px);
}

.cookie-switch input:disabled+.cookie-slider {
    background-color: #999;
    cursor: not-allowed;
}

/* ============================
   RESPONSIVE (Mobile)
   ============================ */

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .cookie-banner-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-modal-header {
        padding: 1rem;
    }

    .cookie-modal-header h2 {
        font-size: 1.25rem;
    }

    .cookie-modal-body {
        padding: 1rem;
    }

    .cookie-modal-footer {
        padding: 1rem;
        flex-direction: column-reverse;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }

    .cookie-category {
        padding: 0.75rem;
    }

    .cookie-category-header {
        flex-direction: row;
    }
}

/* ============================
   ACCESSIBILITY
   ============================ */

.cookie-btn:focus,
.cookie-modal-close:focus,
.cookie-switch input:focus+.cookie-slider {
    outline: 2px solid var(--primary-red, #c41e3a);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .cookie-banner,
    .cookie-modal-content,
    .cookie-btn,
    .cookie-slider,
    .cookie-slider:before {
        animation: none;
        transition: none;
    }
}