/* Netzspitze Cookie Consent - Material/Flat Design */

:root {
    --nz-cc-primary: #2563eb;
    --nz-cc-primary-dark: #1d4ed8;
    --nz-cc-surface: #ffffff;
    --nz-cc-background: #f5f5f5;
    --nz-cc-on-surface: #212121;
    --nz-cc-on-surface-medium: #666666;
    --nz-cc-on-surface-light: #9e9e9e;
    --nz-cc-divider: #e0e0e0;
    --nz-cc-elevation-1: 0 2px 4px rgba(0,0,0,0.08);
    --nz-cc-elevation-2: 0 4px 8px rgba(0,0,0,0.12);
    --nz-cc-elevation-3: 0 8px 16px rgba(0,0,0,0.16);
}

/* Reset & Base */
.nz-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.nz-cookie-banner * {
    box-sizing: border-box;
}

/* Overlay */
.nz-cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Container - Volle Breite */
.nz-cc-container {
    position: relative;
    background: var(--nz-cc-surface);
    width: 100%;
    box-shadow: var(--nz-cc-elevation-3);
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Center Mode */
.nz-cc-center {
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.nz-cc-center .nz-cc-container {
    max-width: 720px;
    border-radius: 4px;
    max-height: calc(100vh - 48px);
}

/* Inner Wrapper für Content-Zentrierung */
.nz-cc-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.nz-cc-header {
    padding: 24px 0 0;
}

.nz-cc-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: var(--nz-cc-on-surface);
    letter-spacing: 0.15px;
}

/* Body */
.nz-cc-body {
    padding: 16px 0;
}

.nz-cc-body > p {
    margin: 0;
    color: var(--nz-cc-on-surface-medium);
    font-size: 14px;
    line-height: 1.7;
}

/* Categories Section */
.nz-cc-categories {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--nz-cc-divider);
}

.nz-cc-category {
    background: var(--nz-cc-background);
    margin-bottom: 8px;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.nz-cc-category:hover {
    box-shadow: var(--nz-cc-elevation-1);
}

.nz-cc-category:last-child {
    margin-bottom: 0;
}

.nz-cc-category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.nz-cc-category-header:hover {
    background: rgba(0, 0, 0, 0.04);
}

.nz-cc-category-name {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    color: var(--nz-cc-on-surface);
    letter-spacing: 0.1px;
}

.nz-cc-required {
    font-weight: 400;
    font-size: 12px;
    color: var(--nz-cc-on-surface-light);
    margin-left: 8px;
}

.nz-cc-expand {
    background: none;
    border: none;
    padding: 8px;
    margin: -8px;
    cursor: pointer;
    color: var(--nz-cc-on-surface-light);
    transition: transform 0.2s ease, color 0.15s ease;
    border-radius: 50%;
}

.nz-cc-expand:hover {
    color: var(--nz-cc-on-surface-medium);
    background: rgba(0, 0, 0, 0.04);
}

.nz-cc-category.expanded .nz-cc-expand {
    transform: rotate(180deg);
}

.nz-cc-category-details {
    display: none;
    padding: 0 20px 16px;
    background: var(--nz-cc-background);
}

.nz-cc-category.expanded .nz-cc-category-details {
    display: block;
}

.nz-cc-category-details p {
    margin: 0 0 8px;
    color: var(--nz-cc-on-surface-medium);
    font-size: 13px;
    line-height: 1.6;
}

.nz-cc-category-details small {
    color: var(--nz-cc-on-surface-light);
    font-size: 12px;
    display: block;
    padding: 8px 12px;
    background: var(--nz-cc-surface);
    border-radius: 4px;
    margin-top: 8px;
}

/* Material Toggle Switch */
.nz-cc-toggle {
    position: relative;
    display: inline-flex;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.nz-cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.nz-cc-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #bdbdbd;
    transition: background-color 0.2s ease;
    border-radius: 10px;
}

.nz-cc-slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    top: 2px;
    background-color: var(--nz-cc-surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nz-cc-toggle input:checked + .nz-cc-slider {
    background-color: var(--nz-cc-primary);
}

.nz-cc-toggle input:checked + .nz-cc-slider::before {
    transform: translateX(16px);
}

.nz-cc-toggle input:focus-visible + .nz-cc-slider {
    outline: 2px solid var(--nz-cc-primary);
    outline-offset: 2px;
}

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

/* Footer */
.nz-cc-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0 24px;
    border-top: 1px solid var(--nz-cc-divider);
    margin-top: 8px;
}

.nz-cc-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.nz-cc-links a {
    color: var(--nz-cc-on-surface-medium);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.25px;
    transition: color 0.15s ease;
    text-transform: uppercase;
}

.nz-cc-links a:hover {
    color: var(--nz-cc-primary);
}

.nz-cc-expiry {
    color: var(--nz-cc-on-surface-light);
    font-size: 12px;
    cursor: help;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nz-cc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Material Flat Buttons */
.nz-cc-btn {
    position: relative;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
    overflow: hidden;
    min-width: 120px;
    text-align: center;
}

/* Ripple Effect */
.nz-cc-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nz-cc-btn:hover::after {
    opacity: 0.08;
}

.nz-cc-btn:active::after {
    opacity: 0.16;
}

/* Settings Button - Text Style */
.nz-cc-btn-settings {
    background: transparent;
    color: var(--nz-cc-primary);
    padding: 12px 16px;
    min-width: auto;
}

.nz-cc-btn-settings:hover {
    background: rgba(37, 99, 235, 0.04);
}

/* Reject Button - Outlined, GLEICHWERTIG mit Accept */
.nz-cc-btn-reject {
    background: transparent;
    color: var(--nz-cc-on-surface);
    border: 2px solid var(--nz-cc-on-surface);
}

.nz-cc-btn-reject:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Save Button - Contained Secondary */
.nz-cc-btn-save {
    background: var(--nz-cc-on-surface);
    color: var(--nz-cc-surface);
}

.nz-cc-btn-save:hover {
    background: #424242;
}

/* Accept Button - Contained Primary, GLEICHWERTIG mit Reject */
.nz-cc-btn-accept {
    background: var(--nz-cc-on-surface);
    color: var(--nz-cc-surface);
    border: 2px solid var(--nz-cc-on-surface);
}

.nz-cc-btn-accept:hover {
    background: #424242;
    border-color: #424242;
}

/* Focus States für Accessibility */
.nz-cc-btn:focus-visible {
    outline: 2px solid var(--nz-cc-primary);
    outline-offset: 2px;
}

/* Floating Button - Material FAB */
.nz-cc-floating {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--nz-cc-surface);
    color: var(--nz-cc-on-surface);
    border: none;
    cursor: pointer;
    box-shadow: var(--nz-cc-elevation-2);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nz-cc-floating:hover {
    transform: translateY(-2px);
    box-shadow: var(--nz-cc-elevation-3);
}

.nz-cc-floating:active {
    transform: translateY(0);
}

.nz-cc-floating svg {
    width: 24px;
    height: 24px;
}

/* Responsive - Tablet */
@media (max-width: 900px) {
    .nz-cc-inner {
        padding: 0 20px;
    }
    
    .nz-cc-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .nz-cc-links {
        justify-content: center;
        order: 2;
    }
    
    .nz-cc-buttons {
        order: 1;
        justify-content: center;
    }
}

/* Responsive - Mobile */
@media (max-width: 600px) {
    .nz-cc-header h3 {
        font-size: 18px;
    }
    
    .nz-cc-inner {
        padding: 0 16px;
    }
    
    .nz-cc-category-header {
        padding: 14px 16px;
    }
    
    .nz-cc-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .nz-cc-btn {
        width: 100%;
        padding: 14px 24px;
    }
    
    .nz-cc-btn-settings {
        order: 3;
    }
    
    .nz-cc-floating {
        bottom: 16px;
        left: 16px;
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    
    .nz-cc-floating svg {
        width: 20px;
        height: 20px;
    }
    
    .nz-cc-links {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Animations */
@keyframes nz-cc-slide-up {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.nz-cc-bottom .nz-cc-container {
    animation: nz-cc-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes nz-cc-fade-scale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.nz-cc-center .nz-cc-container {
    animation: nz-cc-fade-scale 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes nz-cc-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.nz-cc-overlay {
    animation: nz-cc-fade 0.2s ease-out;
}

/* Blocked Content Placeholder - Material Card */
.nz-cc-blocked-content {
    position: relative;
    background: var(--nz-cc-background);
    border-radius: 4px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.nz-cc-placeholder {
    text-align: center;
    padding: 32px 24px;
    max-width: 360px;
}

.nz-cc-placeholder p {
    color: var(--nz-cc-on-surface-medium);
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.6;
}

.nz-cc-placeholder .nz-cc-btn {
    margin: 0 auto;
}

/* Settings Page Shortcode */
.nz-cookie-settings-page {
    padding: 24px;
    background: var(--nz-cc-background);
    border-radius: 4px;
    margin: 24px 0;
}

.nz-cookie-settings-page h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 500;
    color: var(--nz-cc-on-surface);
}

.nz-cookie-settings-page p {
    margin: 0 0 20px;
    color: var(--nz-cc-on-surface-medium);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .nz-cookie-banner {
        --nz-cc-surface: #1e1e1e;
        --nz-cc-background: #2d2d2d;
        --nz-cc-on-surface: #e0e0e0;
        --nz-cc-on-surface-medium: #a0a0a0;
        --nz-cc-on-surface-light: #757575;
        --nz-cc-divider: #424242;
    }
    
    .nz-cc-slider {
        background-color: #616161;
    }
    
    .nz-cc-btn-reject {
        border-color: var(--nz-cc-on-surface);
        color: var(--nz-cc-on-surface);
    }
    
    .nz-cc-btn-accept {
        background: var(--nz-cc-on-surface);
        color: var(--nz-cc-surface);
        border-color: var(--nz-cc-on-surface);
    }
    
    .nz-cc-floating {
        background: var(--nz-cc-surface);
        color: var(--nz-cc-on-surface);
    }
}

/* Print - Banner ausblenden */
@media print {
    .nz-cookie-banner,
    .nz-cc-floating {
        display: none !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .nz-cookie-banner *,
    .nz-cc-floating {
        animation: none !important;
        transition: none !important;
    }
}
