/* ============================================================
   COOKIE BANNER – praxistraining.at
   DSGVO-konform | Opt-in | GA4 ready
   ============================================================ */

/* Banner */
#cookieBanner {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    padding: 1.25rem;
    z-index: 9999;
    display: none;
    animation: cookieSlideUp 0.4s ease-out;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
#cookieBanner.show { display: block; }
@keyframes cookieSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.cookie-banner-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.cookie-banner-content { flex: 1; min-width: 280px; }
.cookie-banner-content h3 {
    font-size: 1rem; font-weight: 600; color: #111827; margin: 0 0 0.35rem;
}
.cookie-banner-content p {
    font-size: 0.8125rem; color: #6B7280; margin: 0; line-height: 1.6;
}
.cookie-banner-content a { color: #DC2626; text-decoration: underline; }

.cookie-banner-actions {
    display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap;
}

/* Buttons */
.cookie-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.5rem 1.125rem; border-radius: 8px;
    font-size: 0.8125rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all 0.2s ease; border: none;
}
.cookie-btn-primary {
    background: #DC2626; color: white;
}
.cookie-btn-primary:hover { background: #B91C1C; transform: translateY(-1px); }
.cookie-btn-outline {
    background: transparent; color: #374151;
    border: 1.5px solid #D1D5DB;
}
.cookie-btn-outline:hover { border-color: #9CA3AF; background: #F9FAFB; }

.cookie-settings-link {
    background: none; border: none; color: #6B7280;
    font-size: 0.8125rem; cursor: pointer; text-decoration: underline;
    font-family: inherit; padding: 0.5rem;
}
.cookie-settings-link:hover { color: #111827; }

/* Settings Modal */
.cookie-settings-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    z-index: 10000; justify-content: center; align-items: center; padding: 1rem;
}
.cookie-settings-overlay.show { display: flex; }

.cookie-settings-modal {
    background: #ffffff; border-radius: 16px;
    max-width: 520px; width: 100%; max-height: 85vh; overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.cookie-settings-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid #E5E7EB;
}
.cookie-settings-header h3 { margin: 0; font-size: 1.0625rem; color: #111827; }
.cookie-close-btn {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: #F3F4F6; color: #6B7280; font-size: 1.25rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}
.cookie-close-btn:hover { background: #E5E7EB; color: #111827; }

.cookie-settings-body { padding: 1.25rem 1.5rem; }

.cookie-category {
    padding: 1rem 0; border-bottom: 1px solid #F3F4F6;
}
.cookie-category:last-child { border-bottom: none; }
.cookie-category-header {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.cookie-category h4 { font-size: 0.9rem; margin: 0 0 0.25rem; color: #111827; }
.cookie-category p { font-size: 0.8rem; color: #6B7280; margin: 0; line-height: 1.5; }

/* Toggle Switch */
.cookie-toggle { flex-shrink: 0; }
.cookie-toggle input { display: none; }
.cookie-toggle-label {
    display: block; width: 44px; height: 24px;
    background: #D1D5DB; border-radius: 12px;
    cursor: pointer; position: relative; transition: background 0.2s ease;
}
.cookie-toggle-label::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 20px; height: 20px; background: white;
    border-radius: 50%; transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.cookie-toggle input:checked + .cookie-toggle-label { background: #059669; }
.cookie-toggle input:checked + .cookie-toggle-label::after { transform: translateX(20px); }
.cookie-toggle-label.disabled { background: #059669; opacity: 0.6; cursor: default; }
.cookie-toggle-label.disabled::after { transform: translateX(20px); }

.cookie-settings-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem; border-top: 1px solid #E5E7EB;
}
.cookie-privacy-link { font-size: 0.8rem; color: #6B7280; text-decoration: underline; }
.cookie-privacy-link:hover { color: #DC2626; }

/* Mobile */
@media (max-width: 640px) {
    .cookie-banner-inner { flex-direction: column; align-items: stretch; }
    .cookie-banner-actions { justify-content: stretch; }
    .cookie-btn { flex: 1; justify-content: center; }
    .cookie-settings-link { text-align: center; }
    .cookie-settings-footer { flex-direction: column-reverse; gap: 0.75rem; }
    .cookie-settings-footer .cookie-btn { width: 100%; }
}