/* Cookie-Popup Styles */

/* Cookie-Popup Overlay */
.cookie-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 41, 59, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
}

/* Cookie-Popup Container */
.cookie-popup {
    background: var(--color-bg-light);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(1, 87, 153, 0.15);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: cookiePopupFadeIn 0.3s ease-out;
    border: 1px solid var(--color-bg-accent);
}

@keyframes cookiePopupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Cookie-Popup Content */
.cookie-popup-content {
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    color: var(--color-text);
}

.cookie-popup-content h2 {
    color: var(--color-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-align: center;
    line-height: 1.3;
}

.cookie-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.cookie-links {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

/* Cookie Section Divider */
.cookie-section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-bg-accent), transparent);
    margin: 1.5rem 0 1rem 0;
}

/* Cookie Section Title */
.cookie-section-title {
    color: var(--color-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-align: left;
    line-height: 1.3;
}

.cookie-link-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.cookie-link-list li {
    margin-bottom: 0.4rem;
    padding-left: 1rem;
    position: relative;
}

.cookie-link-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

.cookie-link-list a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cookie-link-list a:hover,
.cookie-link-list a:focus {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Cookie-Popup Actions */
.cookie-popup-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.cookie-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

.cookie-btn-accept {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(1, 87, 153, 0.2);
}

.cookie-btn-accept:hover,
.cookie-btn-accept:focus {
    background: var(--color-accent);
    box-shadow: 0 4px 12px rgba(1, 87, 153, 0.3);
    transform: translateY(-1px);
}

.cookie-btn-decline {
    background: var(--color-bg-accent);
    color: var(--color-text);
    border: 1px solid var(--color-bg-accent);
}

.cookie-btn-decline:hover,
.cookie-btn-decline:focus {
    background: var(--color-error);
    color: #fff;
    border-color: var(--color-error);
    transform: translateY(-1px);
}

/* Cookie-Settings FAB */
.cookie-fab-container {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 120;
}

.cookie-fab {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary) 60%, var(--color-accent) 100%);
    border-radius: 50%;
    color: #fff;
    border: none;
    box-shadow: 0 4px 18px rgba(1,87,153,0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
}

.cookie-fab i {
    animation: cookieRotate 3s linear infinite;
}

@keyframes cookieRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.cookie-fab:hover,
.cookie-fab:focus {
    background: linear-gradient(135deg, var(--color-accent) 60%, var(--color-primary) 100%);
    box-shadow: 0 8px 32px rgba(1,87,153,0.18);
    transform: scale(1.08);
}

.cookie-fab:hover i,
.cookie-fab:focus i {
    animation-duration: 0.8s;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .cookie-popup {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        border-radius: 12px;
    }
    
    .cookie-popup-content {
        padding: 1.5rem 1rem;
    }
    
    .cookie-popup-content h2 {
        font-size: 1.2rem;
    }
    
    .cookie-popup-actions {
        flex-direction: column;
    }
    
    .cookie-btn {
        min-width: auto;
        width: 100%;
    }
    
    .cookie-fab-container {
        bottom: 28px;
        left: 28px;
    }
    
    .cookie-fab {
        width: 48px;
        height: 48px;
        font-size: 1.7rem;
    }
}

/* Cookie FAB auf Mobilgeräten nach Login ausblenden */
@media (max-width: 768px) {
    /* Verstecke FAB wenn nicht auf Auth-Seite */
    body:not(.auth-page) .cookie-fab-container {
        display: none !important;
    }
    
    /* Zusätzlicher Selektor für eingeloggte Bereiche */
    .logged-in .cookie-fab-container {
        display: none !important;
    }
}

/* Dark Mode Anpassungen */
body.darkmode .cookie-popup {
    border-color: var(--color-bg-accent);
}

body.darkmode .cookie-btn-decline {
    background: var(--color-bg-accent);
    color: var(--color-text);
    border-color: var(--color-bg-accent);
}

/* High Contrast für bessere Accessibility */
@media (prefers-contrast: high) {
    .cookie-popup {
        border: 2px solid var(--color-primary);
    }
    
    .cookie-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion für Accessibility */
@media (prefers-reduced-motion: reduce) {
    .cookie-popup {
        animation: none;
    }
    
    .cookie-btn,
    .cookie-fab {
        transition: none;
    }
    
    .cookie-fab i {
        animation: none;
    }
    
    .cookie-btn:hover,
    .cookie-btn:focus,
    .cookie-fab:hover,
    .cookie-fab:focus {
        transform: none;
    }
}