/*
 * EU-DSGVO Cookie-Banner CSS für Mastodon/Glitch-soc
 * Domain: kunstwerkstatt-celticdreams.at
 * Vollständig EU-DSGVO-konform mit erweiterten Features
 * Mobile-responsive, Accessibility-optimiert, Dark Mode Support
 */

/* CSS-Reset für Cookie-Banner Komponenten */
.cookie-banner, 
.cookie-banner *, 
.cookie-banner *::before, 
.cookie-banner *::after,
.cookie-settings-modal,
.cookie-settings-modal *,
.cookie-settings-modal *::before,
.cookie-settings-modal *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ================================
   HAUPTBANNER STYLING
   ================================ */

/* Hauptcontainer des Cookie-Banners */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #4a5568 100%);
    color: #ffffff;
    padding: 24px 20px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3), 0 -4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-top: 4px solid #4299e1;
    backdrop-filter: blur(8px);
}

/* Banner sichtbar machen */
.cookie-banner.show {
    transform: translateY(0);
}

/* Container für Banner-Inhalt */
.cookie-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header-Bereich */
.cookie-banner-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 4px;
}

.cookie-banner-icon {
    width: 32px;
    height: 32px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

.cookie-banner-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Banner-Inhalt */
.cookie-banner-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cookie-banner-text {
    font-size: 15px;
    line-height: 1.6;
    color: #e2e8f0;
    margin: 0;
}

/* Rechtliche Informationen */
.cookie-banner-legal-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
}

.cookie-legal-text {
    font-size: 13px;
    line-height: 1.5;
    color: #cbd5e0;
    margin: 0;
}

/* ================================
   BUTTON STYLING
   ================================ */

.cookie-banner-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.cookie-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

/* Button-Animationseffekt */
.cookie-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.cookie-btn:hover::before {
    left: 100%;
}

/* Akzeptieren-Button */
.cookie-btn-accept,
.cookie-btn-accept-all {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.cookie-btn-accept:hover,
.cookie-btn-accept-all:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    box-shadow: 0 6px 16px rgba(72, 187, 120, 0.4);
    transform: translateY(-2px);
}

/* Ablehnen-Button */
.cookie-btn-decline,
.cookie-btn-decline-all {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.3);
}

.cookie-btn-decline:hover,
.cookie-btn-decline-all:hover {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    box-shadow: 0 6px 16px rgba(113, 128, 150, 0.4);
    transform: translateY(-2px);
}

/* Einstellungen-Button */
.cookie-btn-settings {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.cookie-btn-settings:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
    transform: translateY(-2px);
}

/* Speichern-Button */
.cookie-btn-save {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
}

.cookie-btn-save:hover {
    background: linear-gradient(135deg, #dd6b20 0%, #c05621 100%);
    box-shadow: 0 6px 16px rgba(237, 137, 54, 0.4);
    transform: translateY(-2px);
}

/* Focus-Styling für Accessibility */
.cookie-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* ================================
   LINKS UND FOOTER
   ================================ */

.cookie-banner-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-banner-links a {
    color: #90cdf4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cookie-banner-links a:hover {
    color: #63b3ed;
    text-decoration: underline;
}

.cookie-banner-links .separator {
    color: #4a5568;
    font-weight: bold;
}

/* ================================
   MODAL/EINSTELLUNGEN STYLING
   ================================ */

.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-settings-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.cookie-settings-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.cookie-settings-modal.show .cookie-settings-content {
    transform: translate(-50%, -50%) scale(1);
}

/* Modal Header */
.cookie-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-settings-header h2 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.cookie-settings-close {
    background: none;
    border: none;
    color: #cbd5e0;
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.cookie-settings-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Modal Body */
.cookie-settings-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Info-Sektion */
.cookie-info-section {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 4px solid #4299e1;
}

.cookie-info-text {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.cookie-info-text:last-child {
    margin-bottom: 0;
}

/* ================================
   COOKIE-KATEGORIEN
   ================================ */

.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-category-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Toggle Switch */
.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    user-select: none;
}

.cookie-toggle input[type="checkbox"] {
    display: none;
}

.cookie-toggle-slider {
    position: relative;
    width: 56px;
    height: 28px;
    background: #4a5568;
    border-radius: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Toggle aktiviert */
.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #48bb78;
}

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

/* Toggle deaktiviert */
.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-toggle input:disabled ~ .cookie-category-name {
    opacity: 0.8;
}

.cookie-category-name {
    flex: 1;
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
}

/* Erforderlich-Badge */
.required-badge {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Kategorie-Details */
.cookie-category-details {
    padding: 20px;
}

.cookie-category-description {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.cookie-category-meta {
    display: grid;
    gap: 8px;
}

.cookie-category-meta p {
    color: #cbd5e0;
    font-size: 13px;
    margin: 0;
}

.cookie-category-meta strong {
    color: #ffffff;
    font-weight: 600;
}

/* ================================
   MODAL FOOTER
   ================================ */

.cookie-legal-footer {
    margin-top: 24px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-legal-footer p {
    color: #a0aec0;
    font-size: 12px;
    margin: 0 0 4px 0;
}

.cookie-legal-footer p:last-child {
    margin-bottom: 0;
}

.cookie-settings-footer {
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.cookie-settings-links {
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.cookie-settings-links a {
    color: #90cdf4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cookie-settings-links a:hover {
    color: #63b3ed;
    text-decoration: underline;
}

/* ================================
   COOKIE-EINSTELLUNGEN LINK
   ================================ */

.cookie-settings-link-container {
    margin-top: 16px;
    text-align: center;
}

.cookie-settings-link {
    color: #4299e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid #4299e1;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
}

.cookie-settings-link:hover {
    background: #4299e1;
    color: white;
    text-decoration: none;
}

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

@media (max-width: 768px) {
    .cookie-banner {
        padding: 20px 16px;
    }

    .cookie-banner-container {
        gap: 16px;
    }

    .cookie-banner-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        text-align: center;
    }

    .cookie-banner-title {
        font-size: 18px;
    }

    .cookie-banner-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .cookie-btn {
        width: 100%;
        min-width: auto;
    }

    .cookie-banner-links {
        flex-direction: column;
        gap: 8px;
    }

    .cookie-settings-content {
        width: 95%;
        max-height: 95vh;
    }

    .cookie-settings-header {
        padding: 20px 16px;
    }

    .cookie-settings-header h2 {
        font-size: 20px;
    }

    .cookie-settings-body {
        padding: 16px;
    }

    .cookie-category-header,
    .cookie-category-details {
        padding: 16px;
    }

    .cookie-settings-footer {
        padding: 16px;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 16px 12px;
    }

    .cookie-banner-icon {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }

    .cookie-banner-title {
        font-size: 16px;
    }

    .cookie-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .cookie-toggle {
        gap: 12px;
    }

    .cookie-toggle-slider {
        width: 48px;
        height: 24px;
    }

    .cookie-toggle-slider::before {
        width: 20px;
        height: 20px;
    }

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

/* ================================
   HIGH CONTRAST MODE
   ================================ */

@media (prefers-contrast: high) {
    .cookie-banner {
        background: #000000;
        border-top: 4px solid #ffffff;
    }

    .cookie-banner-title,
    .cookie-banner-text {
        color: #ffffff;
    }

    .cookie-btn-accept,
    .cookie-btn-accept-all {
        background: #00ff00;
        color: #000000;
    }

    .cookie-btn-decline,
    .cookie-btn-decline-all {
        background: #ff0000;
        color: #ffffff;
    }

    .cookie-btn-settings {
        background: #0066ff;
        color: #ffffff;
    }

    .cookie-settings-content {
        background: #000000;
        border: 2px solid #ffffff;
    }
}

/* ================================
   REDUCED MOTION
   ================================ */

@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-settings-modal,
    .cookie-settings-content,
    .cookie-btn,
    .cookie-toggle-slider,
    .cookie-toggle-slider::before {
        transition: none;
        animation: none;
    }

    .cookie-btn:hover {
        transform: none;
    }
}

/* ================================
   DARK MODE SUPPORT
   ================================ */

@media (prefers-color-scheme: dark) {
    .cookie-banner {
        background: linear-gradient(135deg, #0a0e13 0%, #1a1f2e 50%, #2d3748 100%);
    }

    .cookie-settings-content {
        background: linear-gradient(135deg, #0a0e13 0%, #1a1f2e 100%);
    }
}

/* ================================
   PRINT STYLES
   ================================ */

@media print {
    .cookie-banner,
    .cookie-settings-modal {
        display: none !important;
    }
}
