/* ===== ENHANCED COOKIE BANNER STYLES - COMPLETE VERSION ===== */

/* CSS Variables */
:root {
    --cs-primary-color: #2ecc71;
    --cs-primary-hover: #27ae60;
    --cs-bg-color: #2c3e50;
    --cs-text-color: #ecf0f1;
    --cs-border-radius: 8px;
    --cs-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --cs-animation-speed: 0.3s;
}

/* Reset and base styles */
#cs-cookie-banner *,
#cs-settings-modal *,
#cs-preferences-icon * {
    box-sizing: border-box;
}

/* ===== MAIN BANNER CONTAINER ===== */
#cs-cookie-banner {
    position: fixed !important;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--cs-bg-color) !important;
    color: var(--cs-text-color) !important;
    padding: 20px 30px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 2147483647 !important;
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    transform: translateY(100%);
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    opacity: 0;
    visibility: hidden;
}

/* Banner show state */
#cs-cookie-banner.cs-show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Banner hidden state */
#cs-cookie-banner.cs-hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ===== BANNER POSITION VARIANTS ===== */

/* Bottom Position (Default) */
#cs-cookie-banner.cs-position-bottom {
    bottom: 0 !important;
    top: auto !important;
    left: 0;
    right: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
}

#cs-cookie-banner.cs-position-bottom.cs-show {
    transform: translateY(0) !important;
}

/* Top Position */
#cs-cookie-banner.cs-position-top {
    top: 0 !important;
    bottom: auto !important;
    left: 0;
    right: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-100%);
}

#cs-cookie-banner.cs-position-top.cs-show {
    transform: translateY(0) !important;
}

/* Center Position (Modal Style) */
#cs-cookie-banner.cs-position-center {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    bottom: auto !important;
    right: auto !important;
    width: 90% !important;
    max-width: 600px !important;
    transform: translate(-50%, -50%) scale(0.8);
    border-radius: 12px;
    opacity: 0;
    z-index: 2147483647 !important;
}

#cs-cookie-banner.cs-position-center.cs-show {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
}

/* ===== BANNER STYLE VARIANTS - FIXED ===== */

/* Modern (Default) */
#cs-cookie-banner.cs-style-modern {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
    border-top: 3px solid var(--cs-primary-color);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

/* Minimal & Clean */
#cs-cookie-banner.cs-style-minimal {
    padding: 15px 25px;
    border-top: 2px solid var(--cs-primary-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    background: #f8f9fa !important;
    color: #2c3e50 !important;
}

#cs-cookie-banner.cs-style-minimal #cs-cookie-text {
    color: #2c3e50 !important;
}

#cs-cookie-banner.cs-style-minimal #cs-cookie-text a {
    color: var(--cs-primary-color) !important;
}

#cs-cookie-banner.cs-style-minimal .cs-button.reject {
    background: #e9ecef !important;
    color: #495057 !important;
    border-color: #dee2e6 !important;
}

#cs-cookie-banner.cs-style-minimal .cs-banner-close {
    color: #2c3e50 !important;
}

/* Rounded & Friendly */
#cs-cookie-banner.cs-style-rounded {
    border-radius: 20px 20px 0 0;
    padding: 25px 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

#cs-cookie-banner.cs-style-rounded .cs-button {
    border-radius: 25px !important;
}

/* Bold & Eye-catching */
#cs-cookie-banner.cs-style-bold {
    padding: 25px 40px;
    border-left: 8px solid var(--cs-primary-color);
    background: linear-gradient(135deg, #434343 0%, #000000 100%) !important;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.5);
}

#cs-cookie-banner.cs-style-bold #cs-cookie-text {
    font-weight: 500;
}

/* Glassmorphism (Premium) - FIXED */
#cs-cookie-banner.cs-style-glassmorphism {
    background: rgba(44, 62, 80, 0.7) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 15px 15px 0 0;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Dark Edge (Dunkle Kante) */
#cs-cookie-banner.cs-style-darkedge {
    padding: 25px 35px;
    /* Kontrastreicher Hintergrund */
    background: linear-gradient(145deg, #1c2331 0%, #0d121c 100%) !important;
    /* Auffälliger Kontrastrahmen */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--cs-primary-color);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

#cs-cookie-banner.cs-style-darkedge #cs-cookie-text {
    font-size: 15px;
}

#cs-cookie-banner.cs-style-darkedge .cs-button.reject {
    background-color: transparent !important;
    border-color: #6c757d !important;
    color: #bdc3c7 !important;
}

/* Card Style (Kartenstil) */
#cs-cookie-banner.cs-style-card {
    /* Funktioniert am besten mit cs-position-center */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    bottom: auto !important;
    right: auto !important;
    width: 90% !important;
    max-width: 500px !important;
    transform: translate(-50%, -50%) scale(0.8);
    border-radius: 16px;
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    padding: 30px;
    box-shadow: var(--cs-shadow);
}

#cs-cookie-banner.cs-style-card.cs-show {
    transform: translate(-50%, -50%) scale(1) !important;
}

#cs-cookie-banner.cs-style-card #cs-cookie-text {
    color: #2c3e50 !important;
    margin-bottom: 25px;
}

#cs-cookie-banner.cs-style-card .cs-button.accept {
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.4) !important;
}

#cs-cookie-banner.cs-style-card .cs-banner-close {
    color: #7f8c8d !important;
    background: none;
}

.cmp-consent-banner.cmp-design-corporate {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-top: 3px solid #0f3460;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.cmp-consent-banner.cmp-design-dark {
    background: #1a1a1a;
    color: #e0e0e0;
    border-top: 1px solid #333;
}

.cmp-consent-banner.cmp-design-dark .cmp-btn-accept {
    background: #4CAF50;
    color: white;
}

.cmp-consent-banner.cmp-design-dark .cmp-btn-settings {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #555;
}

/* Dark Edge Style */
.cs-cmp-banner.cs-cmp-style-darkedge {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-top: 3px solid #e94560;
    box-shadow: 0 -8px 32px rgba(233, 69, 96, 0.2);
    color: #f1f1f1;
}

.cs-cmp-banner.cs-cmp-style-darkedge .cs-cmp-btn-accept {
    background: #e94560;
    border-color: #e94560;
}

.cs-cmp-banner.cs-cmp-style-darkedge .cs-cmp-btn-decline,
.cs-cmp-banner.cs-cmp-style-darkedge .cs-cmp-btn-settings {
    background: transparent;
    color: #f1f1f1;
    border: 2px solid #e94560;
}

/* Card Style */
.cs-cmp-banner.cs-cmp-style-card {
    background: white;
    color: #2c3e50;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 24px;
    max-width: 500px;
    margin: 20px auto;
}

.cs-cmp-banner.cs-cmp-style-card.cs-cmp-position-bottom {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.cs-cmp-banner.cs-cmp-style-card .cs-cmp-btn-accept {
    background: #2563eb;
    border-color: #2563eb;
    border-radius: 8px;
}

.cs-cmp-banner.cs-cmp-style-card .cs-cmp-btn-decline,
.cs-cmp-banner.cs-cmp-style-card .cs-cmp-btn-settings {
    background: #f3f4f6;
    color: #374151;
    border-color: #f3f4f6;
    border-radius: 8px;
}

/* Neon Glow Style */
.cs-cmp-banner.cs-cmp-style-neon {
    background: #0a0a0a;
    color: #00ff88;
    border: 2px solid #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5),
                inset 0 0 20px rgba(0, 255, 136, 0.1);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}

.cs-cmp-banner.cs-cmp-style-neon .cs-cmp-btn-accept {
    background: #00ff88;
    color: #0a0a0a;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
    border: none;
}

.cs-cmp-banner.cs-cmp-style-neon .cs-cmp-btn-decline,
.cs-cmp-banner.cs-cmp-style-neon .cs-cmp-btn-settings {
    background: transparent;
    color: #00ff88;
    border: 2px solid #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* Gradient Flow Style */
.cs-cmp-banner.cs-cmp-style-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.cs-cmp-banner.cs-cmp-style-gradient .cs-cmp-btn-accept {
    background: white;
    color: #667eea;
    border: none;
    font-weight: 700;
}

.cs-cmp-banner.cs-cmp-style-gradient .cs-cmp-btn-decline,
.cs-cmp-banner.cs-cmp-style-gradient .cs-cmp-btn-settings {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

/* Soft Shadow Style */
.cs-cmp-banner.cs-cmp-style-shadow {
    background: white;
    color: #2c3e50;
    border: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

.cs-cmp-banner.cs-cmp-style-shadow .cs-cmp-btn-accept {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.cs-cmp-banner.cs-cmp-style-shadow .cs-cmp-btn-decline,
.cs-cmp-banner.cs-cmp-style-shadow .cs-cmp-btn-settings {
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
}

/* Border Accent Style */
.cs-cmp-banner.cs-cmp-style-border {
    background: #ffffff;
    color: #2c3e50;
    border: 3px solid #e74c3c;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.cs-cmp-banner.cs-cmp-style-border .cs-cmp-btn-accept {
    background: #e74c3c;
    color: white;
    border: none;
}

.cs-cmp-banner.cs-cmp-style-border .cs-cmp-btn-decline,
.cs-cmp-banner.cs-cmp-style-border .cs-cmp-btn-settings {
    background: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

/* Verbessertes Glassmorphism für Frontend */
.cs-cmp-banner.cs-cmp-style-glassmorphism {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cs-cmp-banner.cs-cmp-style-glassmorphism .cs-cmp-btn-accept {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cs-cmp-banner.cs-cmp-style-glassmorphism .cs-cmp-btn-decline,
.cs-cmp-banner.cs-cmp-style-glassmorphism .cs-cmp-btn-settings {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
    #cs-cookie-banner.cs-style-glassmorphism {
        background: rgba(44, 62, 80, 0.95) !important;
    }
}

/* ===== BANNER CONTENT SECTIONS ===== */

/* Close Button */
.cs-banner-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ecf0f1;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    opacity: 0.7;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.cs-banner-close:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.cs-banner-close:focus {
    outline: 2px solid var(--cs-primary-color);
    outline-offset: 2px;
}

/* Text Section */
#cs-cookie-text {
    flex: 1;
    margin-right: 20px;
    min-width: 0;
}

#cs-cookie-text p {
    margin: 0 0 8px 0;
    font-size: inherit;
    line-height: 1.6;
    word-wrap: break-word;
}

#cs-cookie-text p:last-child {
    margin-bottom: 0;
}

#cs-cookie-text a {
    color: var(--cs-primary-color);
    text-decoration: underline;
    transition: color 0.2s ease;
}

#cs-cookie-text a:hover,
#cs-cookie-text a:focus {
    color: var(--cs-primary-hover);
    outline: 2px solid var(--cs-primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Button Group */
#cs-cookie-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

/* ===== ENHANCED BUTTON STYLES ===== */
#cs-cookie-banner button.cs-button,
button.cs-button {
    padding: 12px 20px !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 120px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background: none !important;
    position: relative !important;
    overflow: hidden !important;
}

#cs-cookie-banner button.cs-button.accept,
button.cs-button.accept {
    background-color: var(--cs-primary-color) !important;
    color: white !important;
    border-color: var(--cs-primary-color) !important;
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.2) !important;
}

#cs-cookie-banner button.cs-button.reject,
button.cs-button.reject {
    background-color: #6c757d !important;
    color: #ecf0f1 !important;
    border-color: #6c757d !important;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2) !important;
}

#cs-cookie-banner button.cs-button.settings,
button.cs-button.settings {
    background-color: transparent !important;
    color: #bdc3c7 !important;
    border-color: transparent !important;
    text-decoration: underline !important;
    font-size: 13px !important;
    min-width: auto !important;
    padding: 8px 12px !important;
}

.cs-button:focus {
    outline: 3px solid rgba(46, 204, 113, 0.3);
    outline-offset: 2px;
}

.cs-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading state */
.cs-button.cs-loading {
    pointer-events: none;
    opacity: 0.8;
}

.cs-button.cs-loading::after {
    content: "";
    position: absolute;
    right: 10px;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: cs-spin 1s linear infinite;
}

/* Accept Button Hover */
.cs-button.accept:hover:not(:disabled) {
    background-color: var(--cs-primary-hover) !important;
    border-color: var(--cs-primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.cs-button.accept:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.2);
}

/* Reject Button Hover */
.cs-button.reject:hover:not(:disabled) {
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.cs-button.reject:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

/* Settings Button Hover */
.cs-button.settings:hover:not(:disabled) {
    color: #ecf0f1 !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ===== SETTINGS MODAL ===== */

#cs-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2147483646 !important;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#cs-settings-modal.cs-show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.cs-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.cs-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 650px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    color: #2c3e50;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

#cs-settings-modal.cs-show .cs-modal-content {
    transform: scale(1);
}

.cs-modal-content h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
    padding-right: 50px;
}

.cs-modal-content p {
    color: #7f8c8d;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Category Groups */
.cs-category-group {
    margin-bottom: 25px;
    padding: 20px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.cs-category-group:hover {
    border-color: #bdc3c7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.cs-category-group.cs-required {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.cs-category-group h3 {
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cs-category-group h3:hover {
    color: var(--cs-primary-color);
}

.cs-category-group h3 input[type="checkbox"] {
    margin: 0;
    transform: scale(1.2);
    cursor: pointer;
}

/* Info text */
.cs-info {
    font-size: 13px;
    color: #7f8c8d;
    margin: 10px 0 15px 0;
    line-height: 1.5;
    font-style: italic;
}

/* Service Lists */
.cs-service-list {
    margin-top: 15px;
}

.cs-service-list label {
    display: block;
    margin: 12px 0;
    cursor: pointer;
    padding: 15px;
    border-radius: 6px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
    position: relative;
    padding-left: 50px;
    border: 1px solid transparent;
}

.cs-service-list label:hover {
    background-color: #e9ecef;
    border-color: var(--cs-primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cs-service-list label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--cs-primary-color);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cs-service-list label:has(input:checked)::before {
    opacity: 1;
}

.cs-service-list input[type="checkbox"] {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%) scale(1.1);
    margin: 0;
    cursor: pointer;
}

.cs-service-list strong {
    color: #2c3e50;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.cs-service-list small {
    display: block;
    color: #6c757d;
    margin-top: 4px;
    line-height: 1.4;
}

/* Modal Actions */
.cs-modal-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    flex-wrap: wrap;
}

.cs-modal-actions .cs-button {
    min-width: 140px;
    padding: 14px 24px;
    font-size: 15px;
}

/* Close Button */
#cs-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #adb5bd;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cs-modal-close:hover {
    color: #6c757d;
    background-color: #f8f9fa;
    transform: rotate(90deg);
}

#cs-modal-close:focus {
    outline: 2px solid var(--cs-primary-color);
    outline-offset: 2px;
}

/* ===== PREFERENCES ICON ===== */

#cs-preferences-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--cs-bg-color);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 2147483645;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    border: 2px solid transparent;
}

#cs-preferences-icon.cs-show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

#cs-preferences-icon:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    background-color: var(--cs-primary-color);
    border-color: rgba(255, 255, 255, 0.2);
}

#cs-preferences-icon:focus {
    outline: 3px solid rgba(46, 204, 113, 0.3);
    outline-offset: 2px;
}

#cs-preferences-icon svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

#cs-preferences-icon:hover svg {
    transform: rotate(180deg);
}

/* ===== BLOCKED CONTENT ===== */

.cs-blocked-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cs-blocked-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(46, 204, 113, 0.1), transparent);
    transition: left 0.5s ease;
}

.cs-blocked-content:hover {
    border-color: var(--cs-primary-color);
    background: linear-gradient(135deg, #f1f8f4 0%, #e8f5e8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.2);
}

.cs-blocked-content:hover::before {
    left: 100%;
}

.cs-iframe-placeholder {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

/* Unblock buttons */
.cs-unblock-btn,
.cs-consent-unblock {
    background: linear-gradient(135deg, var(--cs-primary-color) 0%, var(--cs-primary-hover) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
    position: relative;
    overflow: hidden;
}

.cs-unblock-btn::before,
.cs-consent-unblock::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.3s ease;
}

.cs-unblock-btn:hover,
.cs-consent-unblock:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.cs-unblock-btn:hover::before,
.cs-consent-unblock:hover::before {
    left: 100%;
}

.cs-unblock-btn:focus,
.cs-consent-unblock:focus {
    outline: 3px solid rgba(46, 204, 113, 0.3);
    outline-offset: 2px;
}

/* ===== ENHANCED QUICK ACTIONS ===== */

.cs-quick-actions {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.cs-quick-actions h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.cs-quick-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cs-quick-btn {
    background: white;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-family: inherit;
}

.cs-quick-btn:hover {
    background: var(--cs-primary-color);
    border-color: var(--cs-primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.cs-quick-btn:focus {
    outline: 2px solid var(--cs-primary-color);
    outline-offset: 2px;
}

.cs-quick-btn:active {
    transform: translateY(0);
}

/* ===== MODAL FOOTER ===== */

.cs-modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.cs-footer-text {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    margin: 0;
    line-height: 1.4;
    font-style: italic;
}

/* ===== SERVICE ITEMS ENHANCEMENTS ===== */

.cs-required-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
    margin-left: auto;
    box-shadow: 0 1px 3px rgba(40, 167, 69, 0.3);
}

.cs-category-icon {
    font-size: 18px;
    margin-right: 5px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.cs-service-count {
    color: #6c757d;
    font-size: 14px;
    font-weight: normal;
    background: rgba(108, 117, 125, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

.cs-provider {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
    margin-left: 5px;
    opacity: 0.8;
}

.cs-privacy-link {
    color: var(--cs-primary-color);
    text-decoration: none;
    font-size: 11px;
    margin-top: 5px;
    display: inline-block;
    transition: all 0.2s ease;
    border-radius: 3px;
    padding: 2px 6px;
    background: rgba(46, 204, 113, 0.1);
}

.cs-privacy-link:hover {
    text-decoration: underline;
    background: rgba(46, 204, 113, 0.2);
    transform: translateX(2px);
}

.cs-privacy-link:focus {
    outline: 2px solid var(--cs-primary-color);
    outline-offset: 2px;
}

.cs-required-service {
    opacity: 0.7;
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    position: relative;
}

/* Enhanced checkbox states */
.cs-service-item input[type="checkbox"]:checked + .cs-service-info {
    color: #155724;
}

.cs-service-item input[type="checkbox"]:checked + .cs-service-info strong {
    color: var(--cs-primary-color);
}

/* ===== NOTIFICATIONS ===== */

.cs-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 50px 15px 20px;
    border-radius: 6px;
    z-index: 2147483640;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 350px;
    min-width: 250px;
    position: relative;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.cs-notification.cs-show {
    transform: translateX(0);
    opacity: 1;
}

.cs-notification-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.cs-notification-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.cs-notification-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.cs-notification-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-notification-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
}

.cs-notification-close:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ===== ANIMATIONS ===== */

@keyframes cs-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cs-fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cs-scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cs-slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes cs-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes cs-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Apply animations */
#cs-cookie-banner.cs-show {
    animation: cs-fadeInUp 0.4s ease-out;
}

#cs-cookie-banner.cs-position-top.cs-show {
    animation: cs-fadeInDown 0.4s ease-out;
}

#cs-cookie-banner.cs-position-center.cs-show {
    animation: cs-scaleIn 0.4s ease-out;
}

.cs-notification.cs-show {
    animation: cs-slideInRight 0.3s ease-out;
}

#cs-preferences-icon.cs-show {
    animation: cs-scaleIn 0.3s ease-out;
}

.cs-button:hover {
    animation: cs-pulse 0.5s ease-in-out;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    #cs-cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
        gap: 15px;
    }
    
    #cs-cookie-banner.cs-mobile {
        padding: 15px;
    }
    
    #cs-cookie-text {
        margin-right: 0;
        margin-bottom: 0;
    }
    
    #cs-cookie-actions {
        justify-content: center;
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .cs-button {
        width: 100%;
        min-width: 0;
        justify-content: center;
        padding: 14px 20px;
    }
    
    .cs-modal-content {
        margin: 10px;
        padding: 20px;
        max-height: 90vh;
    }
    
    .cs-modal-content h2 {
        font-size: 20px;
        padding-right: 40px;
    }
    
    .cs-modal-actions {
        flex-direction: column;
    }
    
    .cs-modal-actions .cs-button {
        width: 100%;
        max-width: none;
    }
    
    #cs-preferences-icon {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .cs-blocked-content {
        padding: 20px 15px;
    }
    
    .cs-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .cs-quick-buttons {
        flex-direction: column;
    }
    
    .cs-quick-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    #cs-cookie-banner {
        padding: 15px 10px;
        font-size: 13px;
    }
    
    .cs-button {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .cs-modal-content {
        padding: 15px;
    }
    
    .cs-modal-content h2 {
        font-size: 18px;
    }
    
    .cs-category-group {
        padding: 15px;
    }
    
    .cs-category-group h3 {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .cs-required-badge {
        margin-left: 0;
        margin-top: 5px;
    }
    
    .cs-service-count {
        width: 100%;
        margin-top: 5px;
    }
    
    .cs-service-list label {
        padding: 12px;
        padding-left: 40px;
    }
    
    #cs-preferences-icon {
        width: 45px;
        height: 45px;
    }
    
    #cs-preferences-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cs-reduced-motion #cs-cookie-banner,
    .cs-reduced-motion #cs-settings-modal,
    .cs-reduced-motion #cs-preferences-icon {
        transition: none !important;
        animation: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cs-high-contrast #cs-cookie-banner {
        border: 3px solid;
        background: #000 !important;
        color: #fff !important;
    }
    
    .cs-high-contrast .cs-button {
        border-width: 3px !important;
    }
    
    .cs-high-contrast .cs-blocked-content {
        border-width: 3px !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cs-modal-content {
        background-color: #2c3e50;
        color: #ecf0f1;
    }
    
    .cs-category-group {
        background-color: #34495e;
        border-color: #4a5f7a;
    }
    
    .cs-service-list label {
        background-color: #34495e;
        color: #ecf0f1;
    }
    
    .cs-service-list label:hover {
        background-color: #4a5f7a;
    }
    
    .cs-modal-content h2 {
        color: #ecf0f1;
    }
    
    .cs-modal-content p {
        color: #bdc3c7;
    }
}

/* ===== LOADING STATES ===== */

.cs-loading {
    pointer-events: none;
    opacity: 0.7;
}

#cs-cookie-banner.cs-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

#cs-settings-modal.cs-loading .cs-modal-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== FOCUS MANAGEMENT ===== */

.cs-focus-trap {
    position: relative;
}

.cs-focus-trap::before,
.cs-focus-trap::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
}

/* Selection styles */
#cs-cookie-banner ::selection,
#cs-settings-modal ::selection {
    background: var(--cs-primary-color);
    color: white;
}

#cs-cookie-banner ::-moz-selection,
#cs-settings-modal ::-moz-selection {
    background: var(--cs-primary-color);
    color: white;
}

/* Scrollbar styles */
.cs-modal-content::-webkit-scrollbar {
    width: 8px;
}

.cs-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cs-modal-content::-webkit-scrollbar-thumb {
    background: var(--cs-primary-color);
    border-radius: 4px;
}

.cs-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--cs-primary-hover);
}

/* Enhanced mobile touch targets */
@media (max-width: 768px) {
    .cs-button,
    .cs-unblock-btn,
    .cs-consent-unblock,
    #cs-modal-close,
    .cs-banner-close {
        min-height: 44px;
        min-width: 44px;
    }
    
    .cs-service-list input[type="checkbox"] {
        min-width: 20px;
        min-height: 20px;
    }
}

/* ===== PRINT STYLES ===== */

@media print {
    #cs-cookie-banner,
    #cs-settings-modal,
    #cs-preferences-icon,
    .cs-blocked-content,
    .cs-notification {
        display: none !important;
    }
    
    .cs-modal-content {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        transform: none !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

/* ===== UTILITIES AND HELPERS ===== */

.cs-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cs-no-scroll {
    overflow: hidden;
}

.cs-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body.cs-modal-open {
    overflow: hidden;
}

/* Force visibility for debugging */
.cs-debug #cs-cookie-banner {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    border: 3px solid #e74c3c !important;
}

.cs-debug #cs-preferences-icon {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    border: 2px solid #e74c3c !important;
}

.cs-debug::before {
    content: "DEBUG MODE";
    position: absolute;
    top: -30px;
    left: 10px;
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: bold;
    z-index: 1;
    font-family: monospace;
}

/* ===== BROWSER COMPATIBILITY FIXES ===== */

/* Firefox specific fixes */
@-moz-document url-prefix() {
    #cs-cookie-banner {
        scrollbar-width: thin;
    }
}

/* Safari specific fixes */
@supports (-webkit-appearance: none) {
    #cs-cookie-banner.cs-style-glassmorphism {
        -webkit-backdrop-filter: blur(20px);
    }
    
    .cs-button {
        -webkit-appearance: none;
    }
}

/* Edge specific fixes */
@supports (-ms-ime-align: auto) {
    #cs-cookie-banner {
        position: -ms-device-fixed;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

#cs-cookie-banner,
#cs-settings-modal,
#cs-preferences-icon {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.cs-button,
.cs-unblock-btn,
.cs-consent-unblock {
    will-change: transform;
}