/* ============================================================
   OPUSsocial – Consent-Banner und Einstellungsdialog
   Eigenstaendig (keine Variablen aus app.css noetig), damit die
   Styles auf Landingpage und in der App identisch funktionieren.
   ============================================================ */

.ks-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 900;
    background: #ffffff;
    color: #183553;
    border: 1px solid rgba(24, 53, 83, 0.14);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(24, 53, 83, 0.18);
}

.ks-consent__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    max-width: 1160px;
    margin: 0 auto;
    padding: 16px 20px;
}

.ks-consent__text {
    flex: 1 1 460px;
    min-width: 0;
}

.ks-consent__text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.ks-consent__text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #4b5f77;
}

.ks-consent__text a {
    color: #a92056;
    text-decoration: underline;
}

.ks-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ks-consent__btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 9px 16px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ks-consent__btn--primary {
    background: #C42966;
    color: #ffffff;
}

.ks-consent__btn--primary:hover {
    background: #a92057;
}

.ks-consent__btn--ghost {
    background: transparent;
    border-color: rgba(24, 53, 83, 0.2);
    color: #183553;
}

.ks-consent__btn--ghost:hover {
    background: rgba(24, 53, 83, 0.06);
}

/* Dialog */
.ks-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ks-consent-modal[hidden],
.ks-consent[hidden] {
    display: none;
}

.ks-consent-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 20, 34, 0.55);
}

.ks-consent-modal__panel {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
    color: #183553;
    box-shadow: 0 26px 60px rgba(9, 20, 34, 0.32);
}

.ks-consent-modal__title {
    margin: 0 0 8px;
    font-size: 19px;
}

.ks-consent-modal__intro {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.55;
    color: #4b5f77;
}

.ks-consent-cat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid rgba(24, 53, 83, 0.1);
}

.ks-consent-cat > div {
    min-width: 0;
}

.ks-consent-cat strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

.ks-consent-cat span {
    display: block;
    font-size: 12.5px;
    line-height: 1.5;
    color: #5f7189;
}

.ks-consent-cat__state {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #15803d;
}

.ks-consent-switch {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    margin-top: 2px;
    cursor: pointer;
}

.ks-consent-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.ks-consent-switch__track {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: rgba(24, 53, 83, 0.22);
    transition: background-color 0.15s ease;
}

.ks-consent-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(9, 20, 34, 0.25);
    transition: transform 0.15s ease;
}

.ks-consent-switch input:checked + .ks-consent-switch__track {
    background: #C42966;
}

.ks-consent-switch input:checked + .ks-consent-switch__track::after {
    transform: translateX(20px);
}

.ks-consent-switch input:focus-visible + .ks-consent-switch__track {
    outline: 2px solid #C42966;
    outline-offset: 2px;
}

.ks-consent-modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

@media (max-width: 640px) {
    .ks-consent {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .ks-consent__inner {
        padding: 14px;
    }

    .ks-consent__actions {
        width: 100%;
    }

    .ks-consent__actions .ks-consent__btn {
        flex: 1 1 auto;
    }
}
