/**
 * Cookie Consent Banner - Dr. Erwin Schatz Website
 * Passend zum Website-Design mit Teal-Farben
 * Kompakte Version für Desktop und Mobile
 */

/* Overlay */
.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Banner Container */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.cookie-consent-banner.active {
    transform: translateY(0);
}

/* Inner Container - KOMPAKTER */
.cookie-consent-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

/* Header - KLEINER */
.cookie-consent-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cookie-consent-header svg {
    width: 22px;
    height: 22px;
    color: #00695C;
    flex-shrink: 0;
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Description - KÜRZER */
.cookie-consent-description {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4a4a4a;
    margin: 0 0 0.75rem 0;
}

/* Cookie Categories - KOMPAKTER */
.cookie-consent-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Category als klickbares Label */
.cookie-category {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background 0.2s ease;
    cursor: pointer;
    user-select: none;
}

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

/* Versteckte native Checkbox */
.cookie-category input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom Checkbox */
.cookie-category-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #adb5bd;
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 1px;
}

/* Checkbox checked state */
.cookie-category input[type="checkbox"]:checked+.cookie-category-checkbox {
    background: #00695C;
    border-color: #00695C;
}

.cookie-category input[type="checkbox"]:checked+.cookie-category-checkbox::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Disabled checkbox (necessary) */
.cookie-category input[type="checkbox"]:disabled+.cookie-category-checkbox {
    background: #00695C;
    border-color: #00695C;
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-category input[type="checkbox"]:disabled+.cookie-category-checkbox::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Focus state */
.cookie-category input[type="checkbox"]:focus+.cookie-category-checkbox {
    box-shadow: 0 0 0 3px rgba(0, 105, 92, 0.2);
}

.cookie-category-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cookie-category-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cookie-category-required {
    font-size: 0.7rem;
    font-weight: 400;
    color: #666;
    background: #e9ecef;
    padding: 1px 6px;
    border-radius: 3px;
}

.cookie-category-description {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.4;
    display: block;
}

/* Buttons - KOMPAKTER */
.cookie-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.cookie-consent-btn {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.cookie-consent-btn-accept {
    background: #00695C;
    color: #fff;
}

.cookie-consent-btn-accept:hover {
    background: #004D40;
}

.cookie-consent-btn-save {
    background: #e9ecef;
    color: #1a1a1a;
    border: 1px solid #dee2e6;
}

.cookie-consent-btn-save:hover {
    background: #dee2e6;
}

.cookie-consent-btn-reject {
    background: transparent;
    color: #666;
    border: 1px solid #dee2e6;
}

.cookie-consent-btn-reject:hover {
    background: #f8f9fa;
    color: #1a1a1a;
}

/* Footer Links - KLEINER */
.cookie-consent-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    font-size: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

.cookie-consent-footer a {
    color: #00695C;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cookie-consent-footer a:hover {
    color: #004D40;
    text-decoration: underline;
}

/* Cookie Toggle Icon (Bottom Left) - KLEINER */
.cookie-consent-toggle {
    position: fixed;
    bottom: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: #00695C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 105, 92, 0.3);
    z-index: 99997;
    transition: transform 0.2s ease, background 0.2s ease;
    border: none;
    opacity: 0;
    visibility: hidden;
}

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

.cookie-consent-toggle:hover {
    transform: scale(1.1);
    background: #004D40;
}

.cookie-consent-toggle svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

/* Mobile Responsive - NOCH KOMPAKTER */
@media (max-width: 600px) {
    .cookie-consent-inner {
        padding: 0.875rem 1rem;
    }

    .cookie-consent-header {
        margin-bottom: 0.35rem;
    }

    .cookie-consent-header h3 {
        font-size: 0.95rem;
    }

    .cookie-consent-header svg {
        width: 20px;
        height: 20px;
    }

    .cookie-consent-description {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .cookie-consent-categories {
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }

    .cookie-consent-buttons {
        flex-direction: column;
        gap: 0.4rem;
    }

    .cookie-consent-btn {
        width: 100%;
        min-width: unset;
        padding: 0.55rem 0.75rem;
        font-size: 0.8rem;
    }

    .cookie-category {
        padding: 0.5rem 0.6rem;
    }

    .cookie-category-checkbox {
        width: 18px;
        height: 18px;
        min-width: 18px;
    }

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

    .cookie-category-description {
        font-size: 0.7rem;
    }

    .cookie-consent-footer {
        font-size: 0.7rem;
        gap: 0.75rem;
    }

    .cookie-consent-toggle {
        bottom: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
    }

    .cookie-consent-toggle svg {
        width: 18px;
        height: 18px;
    }
}

/* Animation for categories */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-consent-banner.active .cookie-category {
    animation: fadeIn 0.25s ease forwards;
}

.cookie-consent-banner.active .cookie-category:nth-child(1) {
    animation-delay: 0.05s;
}

.cookie-consent-banner.active .cookie-category:nth-child(2) {
    animation-delay: 0.1s;
}

.cookie-consent-banner.active .cookie-category:nth-child(3) {
    animation-delay: 0.15s;
}