/* Cookie Banner Styling für Wombach.de
 * Version: 2.0 - September 2025
 * Responsive Design für alle Geräte
 */

/* ===== COOKIE BANNER (unten fixiert) ===== */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: bottom 0.5s ease-in-out;
    border-top: 3px solid #4a90e2;
    max-width: 965px;  /* Angepasst an deine Website-Breite */
    width: calc(100% - 40px);  /* Seitlicher Abstand */
    box-sizing: border-box;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    max-width: 965px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-text {
    flex: 1;
    line-height: 1.6;
    font-size: 14px;
}

.cookie-text strong {
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
}

.privacy-link {
    color: #ffd700;
    text-decoration: underline;
    font-weight: bold;
}

.privacy-link:hover {
    color: #fff;
}

/* ===== BUTTONS ===== */
.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn.accept {
    background: #28a745;
    color: white;
}

.cookie-btn.accept:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.cookie-btn.decline {
    background: #dc3545;
    color: white;
}

.cookie-btn.decline:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.cookie-btn.settings {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
}

.cookie-btn.settings:hover {
    background: white;
    color: #1e3c72;
    transform: translateY(-2px);
}

/* ===== MODAL (Einstellungen) ===== */
.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.cookie-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e9ecef;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 22px;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: white;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

/* Modal Body */
.cookie-modal-body {
    padding: 25px;
}

.cookie-option {
    margin-bottom: 20px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cookie-option:hover {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.cookie-option-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.cookie-option-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-option-title strong {
    color: #1e3c72;
}

.cookie-badge {
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.cookie-description {
    color: #6c757d;
    font-size: 13px;
    margin: 0;
    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.4s;
    border-radius: 26px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: #28a745;
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(24px);
}

.cookie-switch input:disabled + .cookie-slider {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Modal Footer */
.cookie-modal-footer {
    padding: 20px 25px;
    border-top: 2px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .cookie-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}

/* Smartphones */
@media (max-width: 480px) {
    .cookie-banner {
        padding: 15px;
    }
    
    .cookie-text {
        font-size: 13px;
    }
    
    .cookie-text strong {
        font-size: 14px;
    }
    
    .cookie-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .cookie-modal-header h2 {
        font-size: 18px;
    }
    
    .cookie-option {
        padding: 12px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-btn,
    .cookie-modal,
    .cookie-modal-content {
        transition: none;
        animation: none;
    }
}