/**
 * Cookie Consent Banner Styles
 * DSGVO-konform für Hausverwaltung Doll
 */

/* Banner Container */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    max-height: 90vh;
    overflow-y: auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

/* Content Container */
.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 1.5rem 1rem;
    }
}

/* Header */
.cookie-consent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.cookie-consent-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

@media (max-width: 768px) {
    .cookie-consent-header h2 {
        font-size: 1.25rem;
    }
}

.cookie-consent-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.cookie-consent-close:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

/* Body */
.cookie-consent-body {
    margin-bottom: 2rem;
}

.cookie-consent-description {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.cookie-consent-description a {
    color: #2a50db;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-consent-description a:hover {
    color: #1e40af;
}

/* Categories */
.cookie-categories {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .cookie-categories {
        padding: 1rem;
    }
}

.cookie-category {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
    transition: border-color 0.2s;
}

.cookie-category:hover {
    border-color: #2a50db;
}

.cookie-category-header {
    margin-bottom: 0.5rem;
}

.cookie-category-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: #1f2937;
}

.cookie-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: #2a50db;
    flex-shrink: 0;
}

.cookie-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-category-name {
    flex: 1;
    font-size: 1rem;
}

.cookie-required-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.cookie-category-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    padding-left: 2rem;
}

@media (max-width: 768px) {
    .cookie-category-description {
        padding-left: 0;
        margin-top: 0.5rem;
    }
}

/* Footer / Buttons */
.cookie-consent-footer {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .cookie-consent-footer {
        flex-direction: column;
    }
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-family: inherit;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cookie-btn {
        width: 100%;
        padding: 1rem 1.5rem;
    }
}

.cookie-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-btn:active {
    transform: translateY(0);
}

.cookie-btn:focus {
    outline: 2px solid #2a50db;
    outline-offset: 2px;
}

/* Primary Button (Alle akzeptieren) */
.cookie-btn-primary {
    background: #2a50db;
    color: #ffffff;
}

.cookie-btn-primary:hover {
    background: #1e40af;
}

/* Secondary Button (Auswahl speichern) */
.cookie-btn-secondary {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.cookie-btn-secondary:hover {
    background: #e5e7eb;
}

/* Tertiary Button (Nur notwendige) */
.cookie-btn-tertiary {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.cookie-btn-tertiary:hover {
    background: #f9fafb;
    color: #1f2937;
}

/* Settings Button (floating) */
.cookie-settings-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2a50db;
    color: #ffffff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(42, 80, 219, 0.3);
    z-index: 999998;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-settings-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(42, 80, 219, 0.4);
}

.cookie-settings-button:active {
    transform: scale(0.95);
}

.cookie-settings-button:focus {
    outline: 2px solid #2a50db;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .cookie-settings-button {
        width: 48px;
        height: 48px;
        bottom: 16px;
        left: 16px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-btn,
    .cookie-settings-button,
    .cookie-category {
        transition: none;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: #1f2937;
    }

    .cookie-consent-header h2 {
        color: #f9fafb;
    }

    .cookie-consent-description {
        color: #d1d5db;
    }

    .cookie-categories {
        background: #111827;
    }

    .cookie-category {
        background: #1f2937;
        border-color: #374151;
    }

    .cookie-category-label {
        color: #f9fafb;
    }

    .cookie-category-description {
        color: #9ca3af;
    }

    .cookie-consent-footer {
        border-top-color: #374151;
    }

    .cookie-btn-secondary {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }

    .cookie-btn-secondary:hover {
        background: #4b5563;
    }

    .cookie-btn-tertiary {
        color: #9ca3af;
        border-color: #4b5563;
    }

    .cookie-btn-tertiary:hover {
        background: #374151;
        color: #f9fafb;
    }
}

/* Print Styles */
@media print {
    .cookie-consent-banner,
    .cookie-settings-button {
        display: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border: 3px solid #000000;
    }

    .cookie-btn {
        border: 2px solid currentColor;
    }
}
