/*
 * mcsh-consent-v2.css
 * Consent card per owner template: centred floating card, three equally sized
 * actions (reject / information / accept), category view, card footer with the
 * legal links, small floating revocation button.
 * Fixed position -> never shifts the page. Dark panel look, WCAG AA contrast.
 */

.mcsh-consent {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2060;
    display: flex;
    justify-content: center;
    padding: 0 1rem 1rem;
    pointer-events: none;
}

.mcsh-consent[hidden] { display: none !important; }

.mcsh-consent-panel {
    width: 100%;
    max-width: 880px;
    max-height: 90vh;
    overflow: auto;
    padding: 1.3rem 1.5rem 1.1rem;
    border: 1px solid #526173;
    border-radius: 14px;
    background: rgba(40, 52, 66, .97);
    color: #eef3f9;
    box-shadow: 0 1.2rem 2.8rem rgba(0, 0, 0, .5);
    backdrop-filter: blur(6px);
    pointer-events: auto;
    animation: mcsh-consent-in .28s ease-out both;
}

@keyframes mcsh-consent-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .mcsh-consent-panel { animation: none; }
}

.mcsh-consent-title {
    margin: 0 0 .6rem;
    font-size: 1.15rem;
    font-weight: 800;
}

.mcsh-consent-text,
.mcsh-consent-note {
    margin: 0 0 .7rem;
    color: #d6e0ea;
    font-size: .9rem;
    line-height: 1.55;
}

.mcsh-consent-note { color: #b9c6d4; font-size: .84rem; }

/* Three actions, all the same size; only the colour differs. */
.mcsh-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: stretch;
    margin-top: .35rem;
}

.mcsh-consent-button {
    flex: 1 1 0;
    min-width: 150px;
    min-height: 48px;
    padding: .7rem 1rem;
    border: 1px solid transparent;
    border-radius: .55rem;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
}

.mcsh-consent-button-accept {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

.mcsh-consent-button-accept:hover,
.mcsh-consent-button-accept:focus-visible { background: #128040; border-color: #128040; }

.mcsh-consent-button-reject {
    background: #3a4a5c;
    border-color: #8ea4bd;
    color: #f4f8fc;
}

.mcsh-consent-button-reject:hover,
.mcsh-consent-button-reject:focus-visible { background: #46586c; }

.mcsh-consent-button-info {
    background: transparent;
    border-color: #8ea4bd;
    color: #dce8f5;
}

.mcsh-consent-button-info:hover,
.mcsh-consent-button-info:focus-visible { background: rgba(142, 164, 189, .18); }

.mcsh-consent-button:focus-visible {
    outline: 3px solid #f9c846;
    outline-offset: 2px;
}

.mcsh-consent-categories {
    margin: .3rem 0 .9rem;
    padding: .85rem .95rem;
    border: 1px solid #4b5a6b;
    border-radius: .6rem;
    background: rgba(24, 33, 43, .55);
}

.mcsh-consent-categories[hidden] { display: none !important; }

.mcsh-consent-category {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: .55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    cursor: pointer;
}

.mcsh-consent-category:last-of-type { border-bottom: 0; }
.mcsh-consent-category-fixed { cursor: default; }

/* "immer aktiv" - feste Kategorie (Marketing/Werbung laesst sich nicht
   abwaehlen, sie wird wie "Notwendig" angezeigt). */
.mcsh-consent-category-fixed-hint {
    flex: 0 0 auto;
    align-self: center;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #7fd0a0;
    white-space: nowrap;
}

.mcsh-consent-category-text strong { display: block; font-size: .92rem; }
.mcsh-consent-category-text small { display: block; color: #b9c6d4; font-size: .78rem; line-height: 1.45; }

.mcsh-consent-category input[type="checkbox"] {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: .15rem;
    accent-color: #16a34a;
}

.mcsh-consent-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    justify-content: center;
    margin-top: .9rem;
    padding-top: .8rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.mcsh-consent-footer a {
    color: #b9c6d4;
    font-size: .82rem;
    text-decoration: underline;
}

.mcsh-consent-footer a:hover { color: #ffffff; }

.mcsh-consent-status {
    margin: .6rem 0 0;
    min-height: 1em;
    color: #9fc3e8;
    font-size: .8rem;
}

/* Floating revocation button (bottom left). */
.mcsh-consent-reopen {
    position: fixed;
    left: .9rem;
    bottom: .9rem;
    z-index: 2055;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #526173;
    border-radius: 50%;
    background: rgba(40, 52, 66, .95);
    color: #cfe1f2;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}

.mcsh-consent-reopen[hidden] { display: none !important; }

.mcsh-consent-reopen:hover,
.mcsh-consent-reopen:focus-visible { background: #33445a; color: #ffffff; }

.mcsh-consent-reopen-icon { width: 22px; height: 22px; }

.mcsh-consent-footer-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.mcsh-consent-footer-link:hover,
.mcsh-consent-footer-link:focus-visible { text-decoration: underline; }

/* ------------------------------------------------------------------ mobile -- */
@media (max-width: 640px) {
    .mcsh-consent { padding: 0 .6rem calc(.6rem + env(safe-area-inset-bottom, 0px)); }

    .mcsh-consent-panel {
        max-height: 90vh;
        padding: 1rem;
        border-radius: 12px;
    }

    .mcsh-consent-actions { flex-direction: column; }
    .mcsh-consent-button { width: 100%; min-height: 50px; }
}

body.mcsh-consent-gate-active .mcsh-consent { z-index: 2100; }
