/* ==========================================================================
   Consent-Manager (Hinweis + Einstellungs-Modal)
   ========================================================================== */

.cc {
    --cc-text: #1f1f1f;
    --cc-muted: #666;
    --cc-soft: #999;
    --cc-line: #f1f1f1;
    --cc-on: #39be02;
    --cc-off: #ccc;
    font-family: "Open Sans", sans-serif;
    font-weight: 300;
    color: var(--cc-text);
}
.cc [hidden] { display: none !important; }
.cc a { color: inherit; text-decoration: underline; }
html.cc-locked { overflow: hidden; }

/* -------------------------------------------------------------- Aktionen */
.cc-action {
    position: relative;
    margin-right: 1rem;
    padding: 1rem 2.4rem 1rem 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    color: var(--cc-text);
    cursor: pointer;
}
.cc-action:last-child { margin-right: 0; }
.cc-action::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 35px;
    height: 35px;
    margin: auto;
    background: center / contain no-repeat;
}
.cc-action--edit::after   { background-image: url("/images/edit.svg"); }
.cc-action--accept::after { background-image: url("/images/accept.svg"); }
.cc-action--arrow::after  { width: 30px; height: 30px; background-image: url("/images/arrow1.svg"); }
.cc-action--accept, .cc-action--strong { padding-right: 2.2rem; font-size: 17px; font-weight: 500; }
.cc-action:focus-visible, .cc-caret:focus-visible, .cc-close:focus-visible, .cc-cookies summary:focus-visible {
    outline: 2px solid var(--cc-text);
    outline-offset: 2px;
}

/* --------------------------------------------------------------- Hinweis */
.cc-notice {
    position: fixed;
    z-index: 999;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
}
.cc-notice-body {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-end;
    max-width: 1360px;
    margin: auto;
    padding: 1rem;
}
.cc-notice p {
    width: 100%;
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
}
.cc-notice strong { font-weight: 400; }
.cc-notice-imprint { margin: .4rem 0 .5rem !important; }
.cc-notice-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }

/* ----------------------------------------------------------------- Modal */
.cc-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem;
}
.cc-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.cc-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 640px;
    max-width: 100%;
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.cc-close {
    position: absolute;
    top: .8rem;
    right: .8rem;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.cc-close::before, .cc-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 4px;
    right: 4px;
    height: 1.5px;
    background: var(--cc-text);
    transform: rotate(45deg);
}
.cc-close::after { transform: rotate(-45deg); }

.cc-header { padding: 1.5em 3rem 1.2em 1.5em; border-bottom: 1px solid var(--cc-line); }
.cc-header h2 { margin: 0 0 .4rem; font-size: 28px; font-weight: 300; }
.cc-header p { margin: 0; font-size: 16px; line-height: 1.5; }

.cc-body { overflow-y: auto; padding: 1em 1.5em; overscroll-behavior: contain; }
.cc-purposes, .cc-services, .cc-cookies ul { list-style: none; margin: 0; padding: 0; }
.cc-purpose { margin-bottom: 20px; }
.cc-services { margin: .4rem 0 0 1rem; }
.cc-service { margin-bottom: .6rem; padding-left: 0; }

.cc-row {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 .3rem;
    min-height: 30px;
    padding: 4px 0 0 64px;
    cursor: pointer;
}
.cc-title { font-size: 16px; font-weight: 600; }
.cc-required { font-size: 13px; color: var(--cc-soft); }

.cc-caret {
    margin: 0 0 0 64px;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 300;
    color: var(--cc-text);
    cursor: pointer;
}
.cc-desc, .cc-purpose-of, .cc-cookies { margin: .2rem 0 0 64px; }
.cc-desc { font-size: 14px; line-height: 1.5; color: var(--cc-muted); }
.cc-purpose-of { font-size: 12px; color: var(--cc-soft); }
.cc-cookies summary { font-size: 12px; color: #5a9bd5; cursor: pointer; }
.cc-cookies ul { padding: .2rem 0 0 1rem; font-size: 12px; color: var(--cc-muted); }

.cc-toggle-all { padding: 1rem 0 .5rem; border-top: 1px solid var(--cc-line); }

/* --------------------------------------------------------------- Schalter */
.cc-switch { position: absolute; top: 0; left: 0; width: 50px; height: 30px; }
.cc-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.cc-input:disabled { cursor: not-allowed; }
.cc-slider {
    position: absolute;
    inset: 0;
    border-radius: 30px;
    background: var(--cc-off);
    box-shadow: 0 4px 6px 0 rgba(0, 0, 0, .2), 5px 5px 10px 0 rgba(0, 0, 0, .19);
    transition: background .4s;
    pointer-events: none;
}
.cc-slider::before {
    content: '';
    position: absolute;
    left: 5px;
    bottom: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform .4s;
}
.cc-input:checked + .cc-slider { background: var(--cc-on); }
.cc-input:checked + .cc-slider::before { transform: translateX(20px); }
.cc-input.is-partial:checked + .cc-slider { opacity: .6; }
.cc-input.is-partial:checked + .cc-slider::before { transform: translateX(10px); }
.cc-input:focus-visible + .cc-slider { outline: 2px solid var(--cc-text); outline-offset: 2px; }

/* ----------------------------------------------------------------- Footer */
.cc-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: .5em 1.5em;
    border-top: 1px solid var(--cc-line);
}
.cc-footer .cc-action { font-size: 15px; }
.cc-footer .cc-action--strong { font-size: 17px; }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 665px) {
    .cc-notice-actions { width: auto; }
    .cc-header h2 { font-size: 22px; }
    .cc-header p { font-size: 14px; }
}
@media (max-width: 360px) {
    .cc-notice-actions { display: block; text-align: right; }
    .cc-action { padding-top: .5rem; padding-bottom: .5rem; }
    .cc-action::after { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .cc *, .cc *::before, .cc *::after { transition: none !important; }
}

/* -------------------------------------------------------------- Bewegung */
.cc-notice:not([hidden]) { animation: cc-notice-in .6s cubic-bezier(.16, 1, .3, 1) .4s both; }
.cc-modal:not([hidden]) .cc-backdrop { animation: cc-fade .3s ease-out both; }
.cc-modal:not([hidden]) .cc-dialog { animation: cc-dialog-in .45s cubic-bezier(.16, 1, .3, 1) both; }
.cc-action::after { transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
.cc-action:hover::after { transform: translateX(3px); }
.cc-action:active::after { transform: scale(.9); transition-duration: .08s; }
.cc-caret span { display: inline-block; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }

@keyframes cc-notice-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cc-dialog-in {
    from { opacity: 0; transform: translateY(16px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cc-notice:not([hidden]) { animation-name: cc-fade; }
    .cc-modal:not([hidden]) .cc-dialog { animation-name: cc-fade; }
    .cc-action:hover::after { transform: none; }
}
