/* =========================================================
   Cookie-Consent – passend zum Waitz-Design
   Nutzt die globalen CSS-Variablen aus style.css
   ========================================================= */

.cc-banner,
.cc-modal-overlay,
.cc-reopen {
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

/* ----- Einwilligungs-Banner (unten links) ----- */
.cc-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 11000;
    width: 380px;
    max-width: calc(100vw - 48px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 26px 26px 22px;
    transform: translateY(140%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.cc-banner.cc-visible {
    transform: translateY(0);
    opacity: 1;
}

.cc-banner__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), #b51d14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 14px;
    box-shadow: 0 6px 16px rgba(214, 38, 27, 0.3);
}

.cc-banner__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.cc-banner__text {
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--text-light);
    margin: 0 0 18px;
}

.cc-banner__text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cc-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cc-btn {
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.2;
}

.cc-btn--accept {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(214, 38, 27, 0.28);
}

.cc-btn--accept:hover {
    background: #b51d14;
    transform: translateY(-1px);
}

.cc-btn--secondary {
    background: var(--gray-light, #f8f9fa);
    color: var(--text-dark);
    border: 1px solid var(--gray-medium, #e9ecef);
}

.cc-btn--secondary:hover {
    background: var(--gray-medium, #e9ecef);
}

.cc-btn--text {
    background: transparent;
    color: var(--text-light);
    padding: 6px;
    font-size: 0.84rem;
    text-decoration: underline;
}

.cc-btn--text:hover {
    color: var(--primary-color);
}

.cc-actions__row {
    display: flex;
    gap: 10px;
}

.cc-actions__row .cc-btn {
    flex: 1;
}

/* ----- Einstellungen-Modal ----- */
.cc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cc-modal-overlay.cc-visible {
    opacity: 1;
    visibility: visible;
}

.cc-modal {
    background: #fff;
    border-radius: 18px;
    width: 540px;
    max-width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cc-modal-overlay.cc-visible .cc-modal {
    transform: scale(1);
}

.cc-modal__header {
    padding: 26px 28px 18px;
    border-bottom: 1px solid var(--gray-medium, #e9ecef);
}

.cc-modal__header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 6px;
}

.cc-modal__header p {
    font-size: 0.86rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.cc-modal__body {
    padding: 12px 28px 8px;
}

.cc-option {
    border: 1px solid var(--gray-medium, #e9ecef);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 14px;
    transition: border-color 0.2s ease;
}

.cc-option:hover {
    border-color: var(--primary-color);
}

.cc-option__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cc-option__title {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-dark);
}

.cc-option__desc {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-top: 8px;
}

/* Toggle-Schalter */
.cc-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

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

.cc-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cfd4da;
    border-radius: 26px;
    transition: 0.3s;
}

.cc-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

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

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

.cc-switch input:disabled + .cc-slider {
    background: var(--primary-color);
    opacity: 0.55;
    cursor: not-allowed;
}

.cc-modal__footer {
    padding: 16px 28px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cc-modal__footer .cc-btn {
    flex: 1;
    min-width: 140px;
}

/* ----- Floating-Button zum erneuten Öffnen ----- */
.cc-reopen {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 10500;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--primary-color);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.cc-reopen:hover {
    transform: scale(1.08);
}

.cc-reopen.cc-visible {
    display: flex;
}

/* ----- Maps-/Externe-Inhalte-Platzhalter ----- */
.cc-consent-placeholder {
    position: relative;
    background: var(--gray-light, #f8f9fa);
    border: 1px dashed var(--gray-medium, #ced4da);
    border-radius: 12px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}

.cc-consent-placeholder__inner {
    max-width: 420px;
}

.cc-consent-placeholder i {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 14px;
    display: block;
}

.cc-consent-placeholder h4 {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.cc-consent-placeholder p {
    font-size: 0.86rem;
    color: var(--text-light);
    line-height: 1.55;
    margin: 0 0 16px;
}

/* ----- Mobile ----- */
@media (max-width: 600px) {
    .cc-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        padding: 20px 20px 18px;
    }

    .cc-modal__footer {
        flex-direction: column;
    }

    .cc-modal__footer .cc-btn {
        width: 100%;
    }
}
