/**
 * VLS Cookie Management Styles
 * DSGVO/EU konform - Vollständige Styles für Banner und Modal
 */

/* Cookie Banner */
.cookie-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    background: linear-gradient(135deg, #303346, #a73a3b) !important;
    color: white !important;
    z-index: 2147483647 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(100%) !important;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    border-top: 3px solid #dc3545 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cookie-banner.show {
    transform: translateY(0) !important;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-banner-text {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.cookie-icon {
    font-size: 2.5rem;
    animation: cookieBounce 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

@keyframes cookieBounce {
    0%, 50%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-5deg); }
    75% { transform: translateY(-4px) rotate(5deg); }
}

.cookie-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.cookie-text p {
    margin: 0;
    color: #e8e8e8;
    line-height: 1.5;
    font-size: 0.95rem;
    font-weight: 400;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    align-items: center;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.cookie-btn:focus {
    outline: 2px solid rgba(255,255,255,0.5);
    outline-offset: 2px;
}

.cookie-btn-accept-all {
    background: #dc3545;
    color: white;
    border: 2px solid transparent;
}

.cookie-btn-accept-all:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.cookie-btn-settings {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.cookie-btn-settings:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.cookie-btn-reject {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.5);
}

.cookie-btn-reject:hover {
    background: rgba(255,255,255,0.1);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.cookie-btn-save {
    background: #28a745;
    color: white;
    border: 2px solid transparent;
}

.cookie-btn-save:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Cookie Modal */
.cookie-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(48, 51, 70, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    z-index: 2147483648 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    margin: 0 !important;
}

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

.cookie-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(40px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(220, 53, 69, 0.1);
}

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

.cookie-modal-header {
    padding: 2rem;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #303346, #a73a3b);
    color: white;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.cookie-modal-close {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 1.25rem;
    cursor: pointer;
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cookie-modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.cookie-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-intro {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #e8f4fd, #f0f8ff);
    border-radius: 12px;
    border-left: 4px solid #dc3545;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cookie-intro p {
    margin: 0;
    line-height: 1.6;
    color: #2c3e50;
    font-weight: 400;
}

.cookie-categories {
    margin-bottom: 2rem;
}

.cookie-category {
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: #dc3545;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.1);
}

.cookie-category-header {
    padding: 1.5rem;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-category-header:hover {
    background: #e9ecef;
}

.cookie-category.expanded .cookie-category-header {
    background: linear-gradient(135deg, #303346, #a73a3b);
    color: white;
}

.cookie-category-title h3 {
    margin: 0 0 0.5rem 0;
    color: inherit;
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-category-required {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.cookie-category-optional {
    background: linear-gradient(135deg, #dc3545, #a73a3b);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.cookie-toggle {
    position: relative;
}

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

.toggle-label {
    display: block;
    width: 60px;
    height: 32px;
    background: #ddd;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-label {
    background: linear-gradient(135deg, #dc3545, #a73a3b);
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-label::after {
    transform: translateX(28px);
}

.cookie-toggle input[type="checkbox"]:disabled + .toggle-label {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-category-description {
    padding: 1.5rem;
    border-top: 1px solid #e1e8ed;
    background: white;
    display: none;
}

.cookie-category.expanded .cookie-category-description {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-category-description p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: #555;
}

.cookie-details {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #e1e8ed;
}

.cookie-details h4 {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-size: 0.95rem;
    font-weight: 600;
}

.cookie-details ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #666;
}

.cookie-details li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.cookie-additional-info {
    background: linear-gradient(135deg, #fff9e6, #fef7e6);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #dc3545;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cookie-additional-info h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-additional-info p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: #555;
}

.cookie-additional-info a {
    color: #dc3545;
    text-decoration: none;
    font-weight: 500;
}

.cookie-additional-info a:hover {
    text-decoration: underline;
}

.cookie-contact {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dc3545;
}

.cookie-contact h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.cookie-modal-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-top: 1px solid #e1e8ed;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.cookie-settings-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.cookie-settings-link:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
    transform: translateY(-1px);
}

/* VLS Notification Styles */
.vls-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 2147483646;
    transform: translateX(400px);
    transition: transform 0.4s ease;
    max-width: 400px;
    font-family: 'Inter', sans-serif;
    color: white;
}

.vls-notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vls-notification-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto;
    font-size: 0.8rem;
}

.vls-notification-close:hover {
    background: rgba(255,255,255,0.3);
}

.vls-notification-success {
    background: #27ae60;
}

.vls-notification-error {
    background: #e74c3c;
}

.vls-notification-info {
    background: #3498db;
}

/* Browser-spezifische Fixes */
@supports (-webkit-appearance: none) {
    .cookie-banner {
        -webkit-transform: translateY(100%) !important;
    }
    .cookie-banner.show {
        -webkit-transform: translateY(0) !important;
    }
}

@-moz-document url-prefix() {
    .cookie-banner {
        -moz-transform: translateY(100%) !important;
    }
    .cookie-banner.show {
        -moz-transform: translateY(0) !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .cookie-banner-text {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .cookie-icon {
        font-size: 2rem;
    }

    .cookie-banner-actions {
        display: flex;
        gap: 0.75rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .cookie-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
        min-width: 120px;
        flex: 1;
        max-width: 140px;
    }

    .cookie-modal {
        padding: 0.5rem !important;
    }

    .cookie-modal-content {
        max-height: 95vh;
        border-radius: 12px;
    }

    .cookie-modal-header {
        padding: 1.5rem;
    }

    .cookie-modal-header h2 {
        font-size: 1.3rem;
    }

    .cookie-modal-body {
        padding: 1.5rem;
    }

    .cookie-intro {
        padding: 1.25rem;
    }

    .cookie-category-header {
        padding: 1.25rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cookie-category-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cookie-category-description {
        padding: 1.25rem;
    }

    .cookie-modal-footer {
        padding: 1.25rem 1.5rem;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .cookie-modal-footer .cookie-btn {
        flex: 1;
        min-width: 120px;
        max-width: none;
        white-space: nowrap;
    }

    .vls-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
}

@media (max-width: 480px) {
    .cookie-banner-content {
        padding: 1rem 0.75rem;
    }

    .cookie-text h3 {
        font-size: 1.1rem;
    }

    .cookie-text p {
        font-size: 0.9rem;
    }

    .cookie-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        min-width: 120px;
    }

    .cookie-modal-header {
        padding: 1.25rem;
    }

    .cookie-modal-header h2 {
        font-size: 1.2rem;
    }

    .cookie-modal-body {
        padding: 1.25rem;
    }

    .cookie-category-title h3 {
        font-size: 1rem;
    }
}

/* Accessibility */
@media (prefers-contrast: high) {
    .cookie-banner {
        border: 2px solid white !important;
    }

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

@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal,
    .cookie-modal-content,
    .cookie-icon {
        animation: none !important;
        transition: none !important;
    }
}

/* Ultimate positioning fixes */
body .cookie-banner,
html .cookie-banner,
.cookie-banner {
    position: fixed !important;
    bottom: 0px !important;
    left: 0px !important;
    right: 0px !important;
    z-index: 2147483647 !important;
    transform: translateZ(0) !important;
}

body .cookie-modal,
html .cookie-modal,
.cookie-modal {
    position: fixed !important;
    top: 0px !important;
    left: 0px !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483646 !important;
    transform: translateZ(0) !important;
}

/* Create isolated stacking contexts */
.cookie-banner {
    isolation: isolate !important;
}

.cookie-modal {
    isolation: isolate !important;
}

/* Override ANY parent positioning */
* .cookie-banner {
    position: fixed !important;
}

* .cookie-modal {
    position: fixed !important;
}
