/* Custom Cookie Banner Styles - Optimized for Performance & Accessibility */
.custom-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    color: #333333;
    padding: 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    font-family: Arial, sans-serif;
    border-top: 3px solid #e17709;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.custom-cookie-banner.show {
    transform: translateY(0);
}

/* Focus Management für Accessibility */
.custom-cookie-banner:focus-within {
    outline: 2px solid #e17709;
    outline-offset: 2px;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text h3 {
    color: #e17709;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.cookie-banner-text p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    font-size: 15px;
    color: #333333;
    font-weight: 500;
}

.cookie-banner-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.cookie-btn {
    padding: 12px 24px;
    border: 2px solid #e17709;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    will-change: transform, background-color;
}

/* Focus Styles für Accessibility */
.cookie-btn:focus {
    outline: 2px solid #e17709;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(225, 119, 9, 0.2);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cookie-btn {
        border-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .custom-cookie-banner,
    .cookie-btn {
        transition: none;
    }
}

.cookie-btn-accept {
    background-color: #e17709;
    color: white;
}

.cookie-btn-accept:hover {
    background-color: #c66407;
    transform: translateY(-2px);
}

.cookie-btn-settings {
    background-color: #ffffff;
    color: #333333;
    border: 2px solid #e17709;
    font-weight: bold;
}

.cookie-btn-settings:hover {
    background-color: #e17709;
    border-color: #e17709;
    color: white;
}

.cookie-btn-decline {
    background-color: #6c757d;
    color: white;
    font-weight: bold;
}

.cookie-btn-decline:hover {
    background-color: #495057;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-settings-modal.show {
    display: flex;
}

.cookie-settings-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    color: #333;
}

.cookie-settings-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.cookie-settings-close:hover {
    color: #e17709;
}

.cookie-category {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.cookie-category.essential {
    border-left: 4px solid #e17709;
}

.cookie-category.optional {
    border-left: 4px solid #e17709;
}

.cookie-category h4 {
    margin: 0 0 10px 0;
    color: #e17709;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
    min-height: 24px;
    padding-right: 60px;
    position: relative;
}

.cookie-category p {
    color: #444444;
    line-height: 1.6;
    margin-bottom: 15px;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 10px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #e17709;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(26px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-data-details {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid #e17709;
}

.cookie-data-details h5 {
    margin: 0 0 8px 0;
    color: #333333;
    font-size: 14px;
    font-weight: bold;
}

.cookie-data-details ul {
    margin: 5px 0;
    padding-left: 20px;
}

.cookie-data-details li {
    margin: 3px 0;
    font-size: 13px;
    color: #555555;
    font-weight: 500;
}

.cookie-legal-info {
    margin-top: 10px;
    padding: 12px;
    background: #e8f4f8;
    border-radius: 5px;
    font-size: 13px;
    color: #2c5aa0;
    font-weight: 500;
    border-left: 3px solid #17a2b8;
}

.cookie-settings-buttons {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid #ddd;
    padding-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cookie-settings-buttons .cookie-btn {
    min-width: 180px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 8px;
}

.cookie-settings-buttons .cookie-btn-accept {
    background-color: #e17709 !important;
    color: white !important;
    border: 2px solid #e17709 !important;
}

.cookie-settings-buttons .cookie-btn-accept:hover {
    background-color: #c66407 !important;
    border-color: #c66407 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 119, 9, 0.3);
}

.cookie-settings-buttons .cookie-btn-settings {
    background-color: #e17709 !important;
    color: white !important;
    border: 2px solid #e17709 !important;
}

.cookie-settings-buttons .cookie-btn-settings:hover {
    background-color: #c66407 !important;
    border-color: #c66407 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 119, 9, 0.3);
}

/* Cookie-Einstellungen Links - Allgemeine Verbesserung */
a[data-cc="c-settings"] {
    background-color: #e17709 !important;
    color: white !important;
    padding: 10px 15px !important;
    border-radius: 5px !important;
    text-decoration: none !important;
    font-weight: bold !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    border: 2px solid #e17709 !important;
    font-size: 14px !important;
}

a[data-cc="c-settings"]:hover {
    background-color: #c66407 !important;
    border-color: #c66407 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(225, 119, 9, 0.3) !important;
}

/* Spezielle Styles für Footer-Links */
.footer-section a[data-cc="c-settings"] {
    margin: 5px 0 !important;
    width: auto !important;
    min-width: 180px !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-banner-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
        justify-content: center;
        align-items: center;
        display: flex;
    }
    
    .cookie-settings-content {
        margin: 10px;
        padding: 20px;
        max-height: 85vh;
    }
    
    .cookie-settings-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cookie-settings-buttons .cookie-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        justify-content: center;
        display: flex;
    }
    
    /* Toggle-Switches für Mobile optimieren */
    .cookie-category {
        margin: 15px 0;
        padding: 15px;
    }
    
    .cookie-category h4 {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cookie-toggle {
        align-self: flex-end;
        margin: 0;
    }
      /* Toggle-Container für bessere Positionierung */
    .cookie-category h4 {
        position: relative;
    }
    
    .cookie-toggle {
        position: absolute;
        right: 0;
        top: 0;
        margin: 0;
    }
    
    /* Google Maps Container Mobile Optimierung */
    #google-maps-container {
        height: 300px !important;
        min-height: 300px !important;
    }
    
    #google-maps-container div {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
    
    #google-maps-container a[data-cc="c-settings"] {
        font-size: 11px !important;
        padding: 8px 12px !important;
        margin-top: 10px !important;
        display: inline-block !important;
        background-color: #e17709 !important;
        color: white !important;
        border-radius: 4px !important;
        text-decoration: none !important;
        font-weight: bold !important;
        min-width: auto !important;
        white-space: normal !important;
        text-align: center !important;
    }
    
    /* Footer Maps Section Mobile */
    .footer-maps-section {
        margin-bottom: 20px;
    }
}

/* Extra kleine Bildschirme - Smartphones im Hochformat */
@media (max-width: 480px) {
    .custom-cookie-banner {
        padding: 15px;
    }
    
    .cookie-banner-text h3 {
        font-size: 16px;
    }
    
    .cookie-banner-text p {
        font-size: 13px;
    }
    
    .cookie-btn {
        padding: 10px 16px;
        font-size: 12px;
        min-width: 100px;
    }
    
    /* Google Maps Container für sehr kleine Bildschirme */
    #google-maps-container {
        height: 250px !important;
        margin: 10px 0 !important;
    }
    
    #google-maps-container div {
        font-size: 11px !important;
        padding: 15px !important;
    }
    
    #google-maps-container h4 {
        font-size: 14px !important;
        margin-bottom: 10px !important;
    }
    
    #google-maps-container p {
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }
    
    #google-maps-container a[data-cc="c-settings"] {
        font-size: 10px !important;
        padding: 6px 10px !important;
        margin-top: 8px !important;
        width: calc(100% - 20px) !important;
        max-width: 200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
    
    .cookie-settings-content {
        margin: 5px;
        padding: 15px;
        max-height: 90vh;
    }
    
    .cookie-settings-content h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
}

/* Animation für bessere UX */
.cookie-banner-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-settings-fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
