/**
 * Keks Cookie Banner Styles
 * DSGVO-konform: Alle Buttons gleichwertig gestaltet (keine Dark Patterns)
 */

.keks-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

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

.keks-banner.keks-hidden {
    display: none;
}

.keks-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.keks-content {
    flex: 1;
    min-width: 300px;
}

.keks-text {
    margin-bottom: 12px;
}

.keks-text p {
    margin: 0;
}

/* Cookie-Kategorien */
.keks-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.keks-category {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.keks-category:hover {
    background: #e9ecef;
}

.keks-category-required {
    background: #e8f5e9;
    border-color: #c8e6c9;
}

.keks-category-required:hover {
    background: #c8e6c9;
}

/* Custom Checkbox */
.keks-category input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.keks-category-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #666;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.keks-category input[type="checkbox"]:checked + .keks-category-checkbox {
    background: #333;
    border-color: #333;
}

.keks-category input[type="checkbox"]:checked + .keks-category-checkbox::after {
    content: "✓";
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.keks-category input[type="checkbox"]:disabled + .keks-category-checkbox {
    background: #4caf50;
    border-color: #4caf50;
    cursor: not-allowed;
}

.keks-category input[type="checkbox"]:disabled + .keks-category-checkbox::after {
    content: "✓";
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.keks-category-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.keks-category-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.keks-category-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #2e7d32;
    background: #c8e6c9;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    text-transform: uppercase;
}

.keks-category-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Footer mit Datenschutz-Link */
.keks-footer {
    margin-top: 12px;
}

.keks-privacy-link {
    color: #0066cc;
    text-decoration: underline;
    font-size: 13px;
}

.keks-privacy-link:hover {
    color: #004499;
}

.keks-link-separator {
    margin: 0 8px;
    color: #999;
}

/* Buttons */
.keks-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 180px;
}

/* WICHTIG: Alle Buttons gleichwertig gestaltet (DSGVO-konform) */
.keks-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #333;
    text-align: center;
    white-space: nowrap;
}

.keks-btn-accept {
    background: #333;
    color: #fff;
}

.keks-btn-accept:hover {
    background: #555;
    border-color: #555;
}

.keks-btn-reject,
.keks-btn-save {
    background: #fff;
    color: #333;
}

.keks-btn-reject:hover,
.keks-btn-save:hover {
    background: #f5f5f5;
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .keks-banner {
        padding: 16px;
        max-height: 80vh;
        overflow-y: auto;
    }

    .keks-container {
        flex-direction: column;
        align-items: stretch;
    }

    .keks-content {
        min-width: auto;
    }

    .keks-categories {
        flex-direction: column;
    }

    .keks-category {
        max-width: none;
    }

    .keks-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .keks-btn {
        flex: 1;
        min-width: calc(50% - 5px);
    }

    .keks-btn-save {
        min-width: 100%;
        order: -1;
    }
}

@media (max-width: 480px) {
    .keks-buttons {
        flex-direction: column;
    }

    .keks-btn {
        min-width: 100%;
    }
}

/* Consent-Widerruf Link (für Footer) */
.keks-revoke-link {
    cursor: pointer;
    text-decoration: underline;
}

.keks-revoke-link:hover {
    opacity: 0.8;
}

/* Blockier-Overlay (wenn Consent erforderlich) */
.keks-block-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999998;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

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

.keks-block-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.keks-block-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.keks-block-message {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    margin: 0 0 16px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.keks-block-hint {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Mobile Anpassungen für Overlay */
@media (max-width: 600px) {
    .keks-block-content {
        padding: 30px 20px;
        margin: 15px;
    }

    .keks-block-icon {
        font-size: 48px;
    }

    .keks-block-message {
        font-size: 16px;
    }
}

/* Seiten-Blockierung (verhindert Scrollen und Interaktion) */
.keks-body-blocked {
    overflow: hidden !important;
    height: 100vh !important;
}

/* Transparentes Overlay hinter dem Banner */
.keks-page-blocker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999997;
    background: rgba(0, 0, 0, 0.3);
}
