/* ===================================
   PREMIUM COOKIE BANNER DESIGN
   =================================== */

/* Cookie Banner Container - Centered Modal Style */
.cookie-consent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    /* Optimiert: Nur compositor-freundliche Properties transitieren */
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.cookie-consent.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Banner Content Layout - Card Style */
.cookie-content {
    background: linear-gradient(145deg, 
        rgba(15, 23, 42, 0.98) 0%, 
        rgba(30, 41, 59, 0.98) 100%);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 24px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 60px rgba(59, 130, 246, 0.15);
    max-width: 520px;
    width: 100%;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-consent.show .cookie-content {
    transform: scale(1) translateY(0);
}

@media (min-width: 640px) {
    .cookie-content {
        padding: 2.5rem 3rem;
    }
}

/* Text Section - Centered */
.cookie-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
}

.cookie-icon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 12px 32px rgba(59, 130, 246, 0.35),
        0 0 0 6px rgba(59, 130, 246, 0.1);
    font-size: 32px;
    color: white;
    transition: transform 0.3s ease;
}

.cookie-consent.show .cookie-icon {
    animation: iconBounce 0.6s ease-out 0.2s;
}

@keyframes iconBounce {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.cookie-text-content {
    flex: 1;
}

.cookie-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.cookie-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #94a3b8;
    margin-bottom: 0;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.cookie-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.cookie-link:hover {
    color: #93c5fd;
}

.cookie-link::after {
    content: "→";
    transition: transform 0.2s ease;
}

.cookie-link:hover::after {
    transform: translateX(3px);
}

/* Buttons Section - Stacked */
.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

/* Premium Button Styles */
.cookie-btn {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.cookie-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

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

/* Accept Button - Premium Blue */
.cookie-btn-accept {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
    position: relative;
    isolation: isolate;
}

/* Optimierte Animation mit opacity statt box-shadow für bessere Performance */
.cookie-btn-accept::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.4);
    opacity: 0;
    animation: pulseGlow 2s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(59, 130, 246, 0.45),
        0 0 0 0 rgba(59, 130, 246, 0.5);
}

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

/* Decline Button - Elegant Gray */
.cookie-btn-decline {
    background: rgba(71, 85, 105, 0.4);
    color: #cbd5e1;
    border: 2px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cookie-btn-decline:hover {
    background: rgba(71, 85, 105, 0.6);
    border-color: rgba(148, 163, 184, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Settings Button - Transparent */
.cookie-btn-settings {
    background: transparent;
    color: #94a3b8;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.cookie-btn-settings:hover {
    color: #cbd5e1;
    background: rgba(71, 85, 105, 0.2);
}

/* Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    /* Optimiert: Nur compositor-freundliche Properties transitieren */
    transition: opacity 0.3s ease;
}

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

.cookie-modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-radius: 24px;
    box-shadow: 
        0 24px 80px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(96, 165, 250, 0.1);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.cookie-modal-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(71, 85, 105, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transform: rotate(90deg);
}

/* Modal Body */
.cookie-modal-body {
    padding: 2rem;
}

.cookie-category {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(96, 165, 250, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: rgba(96, 165, 250, 0.3);
    background: rgba(30, 41, 59, 0.7);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cookie-category-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-category-required {
    font-size: 0.75rem;
    color: #94a3b8;
    font-style: italic;
    margin-left: 0.5rem;
}

.cookie-category-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.cookie-category-details {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(96, 165, 250, 0.1);
}

/* Toggle Switch - Premium Design */
.cookie-toggle {
    position: relative;
    width: 60px;
    height: 32px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(71, 85, 105, 0.5);
    border: 2px solid rgba(148, 163, 184, 0.3);
    border-radius: 32px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-toggle-slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal Footer */
.cookie-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(96, 165, 250, 0.2);
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

@media (min-width: 640px) {
    .cookie-modal-footer {
        flex-direction: row;
        justify-content: flex-end;
    }
}

/* Revoke Widget - Versteckt, da Cookie-Button jetzt im Menü ist */
.cookie-revoke {
    display: none !important;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    /* Optimiert: Nur compositor-freundliche Properties transitieren */
    transition: opacity 0.3s ease;
}

.cookie-revoke.show {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

.cookie-revoke-btn {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(96, 165, 250, 0.3);
    color: #60a5fa;
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 0 rgba(59, 130, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-revoke-btn:hover {
    background: linear-gradient(135deg, #1e293b 100%, #334155 100%);
    border-color: #60a5fa;
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Scrollbar Styling */
.cookie-modal-content::-webkit-scrollbar {
    width: 8px;
}

.cookie-modal-content::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 4px;
}

.cookie-modal-content::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.3);
    border-radius: 4px;
}

.cookie-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.5);
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .cookie-consent {
        padding: 1rem;
        align-items: flex-end;
    }
    
    .cookie-content {
        padding: 2rem 1.5rem;
        border-radius: 20px;
        max-width: 100%;
    }
    
    .cookie-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .cookie-title {
        font-size: 1.25rem;
    }
    
    .cookie-description {
        font-size: 0.875rem;
    }
    
    .cookie-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .cookie-modal-content {
        border-radius: 16px;
        margin: 0.5rem;
    }
    
    .cookie-modal-header,
    .cookie-modal-body {
        padding: 1.5rem;
    }
    
    .cookie-modal-title {
        font-size: 1.5rem;
    }
}

/* Animation for banner entrance */
@keyframes slideUpFade {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
