/* ========================================
   COOKIE-BANNER - Hoiß Werbetechnik
   ======================================== */

/* Erstes Modal (Einwilligung) */
#cookie-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#cookie-banner.active {
    display: flex;
}

.cookie-banner-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: cookieModalIn 0.35s ease-out;
}

@keyframes cookieModalIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cookie-banner-header {
    background: linear-gradient(135deg, #e87722, #cc6f05);
    color: #ffffff;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
}

.cookie-banner-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.cookie-banner-body {
    padding: 1.75rem 2rem 1.25rem;
}

.cookie-banner-body p {
    color: #4a4a4a;
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

.cookie-banner-body a {
    color: #e87722;
    text-decoration: underline;
    font-weight: 600;
}

.cookie-banner-body a:hover {
    color: #cc6f05;
}

.cookie-banner-footer {
    padding: 1.25rem 2rem 1.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    border-top: 1px solid #e8e8e8;
}

/* Gemeinsame Button-Basis */
.cookie-btn {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    min-width: 140px;
    flex: 1 1 auto;
}

/* Gleichwertige Wahl-Buttons (Akzeptieren / Ablehnen) */
.cookie-btn-choice {
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #4a4a4a;
}

.cookie-btn-choice:hover {
    background: #f5f5f5;
    border-color: #1a1a1a;
    transform: translateY(-1px);
}

.cookie-btn-choice:focus-visible {
    outline: 2px solid #e87722;
    outline-offset: 2px;
}

/* Einstellungen: Outline in Markenfarbe */
.cookie-btn-outline {
    border-color: #e87722;
    color: #e87722;
}

.cookie-btn-outline:hover {
    background: #fff5eb;
    border-color: #cc6f05;
    color: #cc6f05;
}

/* Detail-Modal: Speichern / Abbrechen */
.cookie-btn-accept {
    background: #e87722;
    color: #ffffff;
    border: 2px solid #e87722;
    box-shadow: 0 4px 12px rgba(232, 119, 34, 0.25);
}

.cookie-btn-accept:hover {
    background: #cc6f05;
    border-color: #cc6f05;
    transform: translateY(-1px);
}

.cookie-btn-decline {
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #4a4a4a;
}

.cookie-btn-decline:hover {
    background: #f5f5f5;
    border-color: #1a1a1a;
}

/* Cookie-Einstellungen Detail-Modal */
#cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#cookie-modal.active {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: cookieModalIn 0.35s ease-out;
}

.cookie-modal-header {
    background: linear-gradient(135deg, #e87722, #cc6f05);
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

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

.cookie-option {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.cookie-option:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

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

.cookie-option-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-option-description {
    color: #4a4a4a;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: #e87722;
}

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

.cookie-switch input:disabled + .cookie-slider {
    background-color: #e87722;
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

body.cookie-consent-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-body,
    .cookie-modal-body {
        padding: 1.5rem;
    }

    .cookie-banner-footer {
        flex-direction: column;
        padding: 1.25rem 1.5rem 1.5rem;
    }

    .cookie-banner-footer .cookie-btn,
    .cookie-modal-footer .cookie-btn {
        width: 100%;
        min-width: 0;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }
}
