/**
 * Cookie-Banner Styles
 * DSGVO-konformer Cookie-Consent Banner
 */

#cookie-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    border-top: 1px solid #e1e8ed;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

#cookie-banner.cookie-banner--active {
    transform: translateY(0);
}

.cookie-banner {
    position: relative;
}

.cookie-banner__container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: flex-start;
}

.cookie-banner__content {
    flex: 1;
}

.cookie-banner__header {
    margin: 0 0 15px 0;
}

.cookie-banner__header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.4;
}

.cookie-banner__text {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
}

.cookie-banner__text p {
    margin: 8px 0;
}

.cookie-banner__text a {
    color: #2d3748;
    font-weight: 500;
    text-decoration: underline;
    transition: color 0.2s;
}

.cookie-banner__text a:hover {
    color: #1a202c;
}

/* Details/Accordion */
.cookie-banner__details {
    margin-top: 12px;
}

.cookie-banner__details details {
    margin: 0;
}

.cookie-banner__details summary {
    cursor: pointer;
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
    padding: 8px 0;
    user-select: none;
    transition: color 0.2s;
}

.cookie-banner__details summary:hover {
    color: #1a202c;
}

.cookie-banner__details ul {
    margin: 10px 0 0 20px;
    padding: 0;
    list-style: disc;
    font-size: 13px;
    color: #4a5568;
}

.cookie-banner__details li {
    margin: 4px 0;
    line-height: 1.5;
}

/* Entferne das Häkchen (::before) von template.css */
.cookie-banner__details li::before {
    content: none !important;
}

/* Actions */
.cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.cookie-banner__btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.cookie-banner__btn:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.cookie-banner__btn--primary {
    background-color: #2d3748;
    color: white;
    box-shadow: 0 2px 8px rgba(45, 55, 72, 0.2);
}

.cookie-banner__btn--primary:hover {
    background-color: #1a202c;
    box-shadow: 0 4px 12px rgba(45, 55, 72, 0.3);
    transform: translateY(-1px);
}

.cookie-banner__btn--primary:active {
    transform: translateY(0);
}

.cookie-banner__btn--outline {
    background-color: transparent;
    color: #2d3748;
    border: 1.5px solid #cbd5e0;
}

.cookie-banner__btn--outline:hover {
    border-color: #2d3748;
    background-color: #f7fafc;
}

.cookie-banner__btn--outline:active {
    background-color: #edf2f7;
}

/* Close Button */
.cookie-banner__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
    border-radius: 4px;
}

.cookie-banner__close:hover {
    color: #2d3748;
    background-color: #edf2f7;
}

.cookie-banner__close:focus {
    outline: 2px solid #4299e1;
}

/* Mobile & Tablet */
@media (max-width: 768px) {
    #cookie-banner {
        padding: 16px;
    }

    .cookie-banner__container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cookie-banner__header h3 {
        font-size: 16px;
    }

    .cookie-banner__text {
        font-size: 13px;
    }

    .cookie-banner__actions {
        justify-content: stretch;
    }

    .cookie-banner__btn {
        flex: 1;
        padding: 12px 16px;
    }

    .cookie-banner__close {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
}

/* Super kleine Screens */
@media (max-width: 480px) {
    #cookie-banner {
        padding: 12px 12px 60px 12px;
    }

    .cookie-banner__header h3 {
        font-size: 15px;
    }

    .cookie-banner__text {
        font-size: 12px;
    }

    .cookie-banner__actions {
        flex-direction: column-reverse;
    }

    .cookie-banner__actions .cookie-banner__btn {
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    #cookie-banner {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-top-color: #4a5568;
    }

    .cookie-banner__header h3 {
        color: #f7fafc;
    }

    .cookie-banner__text {
        color: #cbd5e0;
    }

    .cookie-banner__text a {
        color: #e2e8f0;
    }

    .cookie-banner__text a:hover {
        color: #f7fafc;
    }

    .cookie-banner__details summary {
        color: #cbd5e0;
    }

    .cookie-banner__details summary:hover {
        color: #e2e8f0;
    }

    .cookie-banner__details ul {
        color: #cbd5e0;
    }

    .cookie-banner__btn--primary {
        background-color: #4299e1;
        box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
    }

    .cookie-banner__btn--primary:hover {
        background-color: #3182ce;
        box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
    }

    .cookie-banner__btn--outline {
        color: #cbd5e0;
        border-color: #4a5568;
    }

    .cookie-banner__btn--outline:hover {
        border-color: #cbd5e0;
        background-color: #2d3748;
    }

    .cookie-banner__close {
        color: #a0aec0;
    }

    .cookie-banner__close:hover {
        color: #e2e8f0;
        background-color: #2d3748;
    }
}

/* Print Styles */
@media print {
    #cookie-banner {
        display: none !important;
    }
}
