/*
 * Almic Cookie Consent – frontend styles.
 * Spodní, neblokující a klávesnicí ovladatelný panel pro školní web bez reklamní/analytické vrstvy.
 */

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

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

.almic-cookie-consent {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
    overflow-x: hidden;
    background: rgba(255, 255, 255, 0.68);
    color: #2f3438;
    font-family: inherit;
    line-height: 1.55;
    pointer-events: auto;
}

.almic-cookie-consent * {
    box-sizing: border-box;
}

.almic-cookie-consent__panel {
    position: relative;
    width: min(1120px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    background: #ffffff;
    box-shadow: 0 -8px 42px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.08);
    isolation: isolate;
    pointer-events: auto;
}

.almic-cookie-consent__panel:focus {
    outline: 3px solid #0b62d6;
    outline-offset: -3px;
}

.almic-cookie-consent__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 280px);
    gap: clamp(24px, 5vw, 56px);
    align-items: start;
    padding: clamp(26px, 4vw, 44px) clamp(22px, 5vw, 72px);
}

.almic-cookie-consent__content {
    max-width: 690px;
}

.almic-cookie-consent__headline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.almic-cookie-consent__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    font-size: 34px;
    line-height: 1;
}

.almic-cookie-consent__eyebrow {
    margin: 0 0 1px;
    color: #006b2e;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.almic-cookie-consent__title {
    margin: 0;
    color: #24272a;
    font-size: clamp(21px, 2vw, 25px);
    line-height: 1.18;
    font-weight: 800;
}

.almic-cookie-consent__intro {
    max-width: 640px;
    margin: 0 0 16px 56px;
    color: #4b5563;
    font-size: 15px;
}

.almic-cookie-consent__settings-toggle,
.almic-cookie-consent__category-button,
.almic-cookie-consent__decline-button,
.almic-cookie-settings-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.almic-cookie-consent__settings-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px 56px;
    padding: 0;
    color: #1f2933;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.almic-cookie-consent__chevron {
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.18s ease;
}

.almic-cookie-consent__settings-toggle[aria-expanded="true"] .almic-cookie-consent__chevron,
.almic-cookie-consent__category-button[aria-expanded="true"] .almic-cookie-consent__chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}

.almic-cookie-consent__preferences {
    margin-left: 56px;
}

.almic-cookie-consent__preferences-intro {
    margin: 0 0 14px;
    color: #30363b;
    font-size: 14px;
}

.almic-cookie-consent__categories {
    display: grid;
    gap: 10px;
}

.almic-cookie-consent__category {
    border: 1px solid #c7c7c7;
    background: #f4f4f4;
}

.almic-cookie-consent__category-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 52px;
    padding: 0 18px;
    background: #eeeeee;
}

.almic-cookie-consent__category-button {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    min-height: 52px;
    padding: 0;
    color: #34383c;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
}

.almic-cookie-consent__category-body {
    padding: 15px 24px;
    background: #f7f7f7;
}

.almic-cookie-consent__category-body p {
    max-width: 620px;
    margin: 0;
    color: #30363b;
    font-size: 14px;
}

.almic-cookie-consent__switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 30px;
    flex: 0 0 auto;
}

.almic-cookie-consent__switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.almic-cookie-consent__switch-track {
    position: relative;
    display: block;
    width: 56px;
    height: 24px;
    border-radius: 999px;
    background: #69717a;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: background 0.18s ease;
}

.almic-cookie-consent__switch-track::before,
.almic-cookie-consent__switch-track::after {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.almic-cookie-consent__switch-track::before {
    left: 12px;
    content: '✓';
    opacity: 0;
}

.almic-cookie-consent__switch-track::after {
    right: 10px;
    content: '×';
    opacity: 1;
}

.almic-cookie-consent__switch-thumb {
    position: absolute;
    top: 3px;
    left: 4px;
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease;
}

.almic-cookie-consent__switch input:checked + .almic-cookie-consent__switch-track,
.almic-cookie-consent__switch--required .almic-cookie-consent__switch-track {
    background: #006b2e;
}

.almic-cookie-consent__switch input:checked + .almic-cookie-consent__switch-track::before,
.almic-cookie-consent__switch--required .almic-cookie-consent__switch-track::before {
    opacity: 1;
}

.almic-cookie-consent__switch input:checked + .almic-cookie-consent__switch-track::after,
.almic-cookie-consent__switch--required .almic-cookie-consent__switch-track::after {
    opacity: 0;
}

.almic-cookie-consent__switch input:checked + .almic-cookie-consent__switch-track .almic-cookie-consent__switch-thumb,
.almic-cookie-consent__switch--required .almic-cookie-consent__switch-thumb {
    transform: translateX(30px);
}

.almic-cookie-consent__actions {
    display: grid;
    gap: 16px;
    padding-top: clamp(74px, 10vw, 124px);
}

.almic-cookie-consent__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    width: 100%;
    min-height: 54px;
    padding: 12px 20px;
    border: 2px solid #006b2e;
    border-radius: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.almic-cookie-consent__button--primary {
    background: #006b2e;
    color: #ffffff;
}

.almic-cookie-consent__button--secondary {
    background: #ffffff;
    color: #006b2e;
    font-weight: 600;
}

.almic-cookie-consent__button:hover,
.almic-cookie-consent__button:focus-visible {
    transform: translateY(-1px);
}

.almic-cookie-consent__button--primary:hover,
.almic-cookie-consent__button--primary:focus-visible {
    background: #005323;
    border-color: #005323;
}

.almic-cookie-consent__button--secondary:hover,
.almic-cookie-consent__button--secondary:focus-visible {
    background: #eef8f1;
}

.almic-cookie-consent__decline {
    margin: 0;
    color: #2f3438;
    font-size: 14px;
    text-align: center;
}

.almic-cookie-consent__decline-button,
.almic-cookie-settings-link {
    padding: 0;
    color: #006b2e;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.almic-cookie-consent__settings-toggle:focus-visible,
.almic-cookie-consent__category-button:focus-visible,
.almic-cookie-consent__switch input:focus-visible + .almic-cookie-consent__switch-track,
.almic-cookie-consent__button:focus-visible,
.almic-cookie-consent__decline-button:focus-visible,
.almic-cookie-settings-link:focus-visible {
    outline: 3px solid #0b62d6;
    outline-offset: 3px;
}

.almic-cookie-consent__decor {
    position: absolute;
    z-index: 0;
    width: 210px;
    height: 210px;
    border: 14px solid rgba(0, 0, 0, 0.025);
    border-radius: 50%;
    pointer-events: none;
}

.almic-cookie-consent__decor::before,
.almic-cookie-consent__decor::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.025);
    box-shadow:
        48px 20px 0 rgba(0, 0, 0, 0.025),
        94px 68px 0 rgba(0, 0, 0, 0.025),
        38px 120px 0 rgba(0, 0, 0, 0.025),
        126px 128px 0 rgba(0, 0, 0, 0.025);
}

.almic-cookie-consent__decor::before {
    width: 18px;
    height: 18px;
    left: 42px;
    top: 26px;
}

.almic-cookie-consent__decor::after {
    width: 30px;
    height: 30px;
    left: 80px;
    top: 80px;
}

.almic-cookie-consent__decor--left {
    top: -56px;
    left: -82px;
}

.almic-cookie-consent__decor--right {
    top: -88px;
    right: -58px;
    width: 280px;
    height: 280px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    word-wrap: normal !important;
    border: 0;
}

@media (max-width: 900px) {
    .almic-cookie-consent {
        padding: 0;
    }

    .almic-cookie-consent__panel {
        width: 100%;
        max-height: 100dvh;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
    }

    .almic-cookie-consent__grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 28px 20px;
    }

    .almic-cookie-consent__content,
    .almic-cookie-consent__intro,
    .almic-cookie-consent__category-body p {
        max-width: none;
    }

    .almic-cookie-consent__intro,
    .almic-cookie-consent__settings-toggle,
    .almic-cookie-consent__preferences {
        margin-left: 0;
    }

    .almic-cookie-consent__actions {
        padding-top: 0;
    }
}

@media (max-width: 520px) {
    .almic-cookie-consent__headline {
        align-items: flex-start;
    }

    .almic-cookie-consent__icon {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .almic-cookie-consent__category-head {
        grid-template-columns: 1fr auto;
        gap: 8px;
        padding: 10px 12px;
    }

    .almic-cookie-consent__category-button {
        min-height: 40px;
        gap: 12px;
    }

    .almic-cookie-consent__button {
        min-height: 50px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .almic-cookie-consent *,
    .almic-cookie-consent *::before,
    .almic-cookie-consent *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* WCAG 2.1 AA / 2.2: kontrastní zelené prvky cookie panelu.
   WAVE hlásil nízký kontrast u původní světle zelené (#16a245 / #2fa24e). */
.almic-cookie-consent {
    color: #1f2933;
}

.almic-cookie-consent__eyebrow,
.almic-cookie-consent__decline-button,
.almic-cookie-settings-link {
    color: #006b2e;
}

.almic-cookie-consent__intro {
    color: #4b5563;
}

.almic-cookie-consent__button {
    border-color: #006b2e;
}

.almic-cookie-consent__button--primary {
    background: #006b2e;
    border-color: #006b2e;
    color: #ffffff;
}

.almic-cookie-consent__button--primary:hover,
.almic-cookie-consent__button--primary:focus-visible {
    background: #005323;
    border-color: #005323;
    color: #ffffff;
}

.almic-cookie-consent__button--secondary {
    background: #ffffff;
    border-color: #006b2e;
    color: #006b2e;
}

.almic-cookie-consent__button--secondary:hover,
.almic-cookie-consent__button--secondary:focus-visible {
    background: #eef8f1;
    color: #005323;
}

.almic-cookie-consent__switch-track {
    background: #69717a;
}

.almic-cookie-consent__switch input:checked + .almic-cookie-consent__switch-track,
.almic-cookie-consent__switch--required .almic-cookie-consent__switch-track {
    background: #006b2e;
}
