﻿/*!
 * consent.css — lišta súhlasu, modál nastavení a placeholder vloženého obsahu.
 * Samostatný súbor (nie je súčasťou main.scss), aby sa dal načítať skoro
 * a nezávisel na zvyšku štýlov. Farby a písmo prevzaté z main.css.
 */

:root {
    --consent-primary: #006171;
    --consent-primary-dark: #004d5a;
    --consent-text: #1d1d1b;
    --consent-muted: #55605f;
    --consent-border: #d6dcdc;
}

#consent-banner[hidden],
#consent-settings[hidden] {
    display: none !important;
}

/* ------------------------------------------------------------------ */
/* 1. vrstva — lišta                                                   */
/* ------------------------------------------------------------------ */

#consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: #fff;
    color: var(--consent-text);
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .18);
    border-top: 4px solid var(--consent-primary);
    /* Na mobile nesmie prekryť celý obsah. */
    max-height: 70vh;
    overflow-y: auto;
}

.consent-banner__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}

.consent-banner__text {
    flex: 1 1 420px;
    margin: 0;
}

.consent-banner__title {
    display: block;
    font-weight: 800;
    font-size: 17px;
    margin-bottom: 4px;
}

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

.consent-actions {
    flex: 0 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Všetky tri tlačidlá sú rovnocenné: rovnaká veľkosť, rovnaký kontrast,
   rovnaká váha. Žiadne dark patterns. */
.consent-btn {
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    min-width: 170px;
    padding: 13px 20px;
    border: 2px solid var(--consent-primary);
    border-radius: 6px;
    background: var(--consent-primary);
    color: #fff;
    cursor: pointer;
    text-align: center;
    transition: background .2s ease, color .2s ease;
}

.consent-btn:hover,
.consent-btn:focus {
    background: var(--consent-primary-dark);
    border-color: var(--consent-primary-dark);
    color: #fff;
}

.consent-btn:focus-visible,
.consent-toggle input:focus-visible + .consent-toggle__track {
    outline: 3px solid #ffb000;
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* 2. vrstva — modál nastavení                                         */
/* ------------------------------------------------------------------ */

#consent-settings {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .55);
    font-family: 'Nunito', sans-serif;
}

.consent-modal {
    background: #fff;
    color: var(--consent-text);
    border-radius: 10px;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.consent-modal h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    color: var(--consent-primary);
}

.consent-modal__intro {
    margin: 0 0 20px;
    font-size: 15px;
    color: var(--consent-muted);
}

.consent-category {
    border: 1px solid var(--consent-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.consent-category__body {
    flex: 1 1 auto;
}

.consent-category__name {
    font-weight: 800;
    font-size: 16px;
    margin: 0 0 4px;
}

.consent-category__desc {
    margin: 0;
    font-size: 14px;
    color: var(--consent-muted);
}

/* Prepínač */
.consent-toggle {
    flex: 0 0 auto;
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.consent-toggle input {
    position: absolute;
    opacity: 0;
    width: 52px;
    height: 30px;
    margin: 0;
    cursor: pointer;
}

.consent-toggle__track {
    display: block;
    width: 52px;
    height: 30px;
    border-radius: 15px;
    background: #b9c2c2;
    transition: background .2s ease;
    pointer-events: none;
}

.consent-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}

.consent-toggle input:checked + .consent-toggle__track {
    background: var(--consent-primary);
}

.consent-toggle input:checked + .consent-toggle__track::after {
    transform: translateX(22px);
}

.consent-toggle input:disabled + .consent-toggle__track {
    background: var(--consent-primary);
    opacity: .45;
}

.consent-toggle input:disabled {
    cursor: not-allowed;
}

.consent-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.consent-modal__note {
    margin: 16px 0 0;
    font-size: 13px;
    color: var(--consent-muted);
}

body.consent-modal-open {
    overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Placeholder vloženého obsahu (Google Maps a pod.)                    */
/* ------------------------------------------------------------------ */

.consent-embed {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    height: 100%;
    background: #e8edee;
    background-image: linear-gradient(135deg, #e8edee 25%, #eef2f3 25%, #eef2f3 50%, #e8edee 50%, #e8edee 75%, #eef2f3 75%);
    background-size: 28px 28px;
    color: var(--consent-text);
    font-family: 'Nunito', sans-serif;
    text-align: center;
}

.consent-embed--loaded {
    display: block;
    background: none;
    min-height: 0;
}

.consent-embed iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
}

.consent-embed__inner {
    max-width: 460px;
    padding: 28px 22px;
}

.consent-embed__text {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
}

.consent-embed__note {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--consent-muted);
}

/* ------------------------------------------------------------------ */
/* Odkaz v pätičke                                                      */
/* ------------------------------------------------------------------ */

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

/* ------------------------------------------------------------------ */
/* Mobil                                                                */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
    #consent-banner {
        max-height: 60vh;
        font-size: 14px;
    }

    .consent-banner__inner {
        padding: 16px;
        gap: 12px;
    }

    .consent-actions {
        width: 100%;
        flex-direction: column;
    }

    .consent-btn {
        width: 100%;
        min-width: 0;
    }

    .consent-modal {
        padding: 20px;
        max-height: 90vh;
    }

    .consent-category {
        flex-direction: row;
        padding: 14px;
    }
}

/* ------------------------------------------------------------------ */
/* Napojenie na existujúci dizajn                                       */
/* ------------------------------------------------------------------ */

/* Placeholder mapy v pätičke podstránok */
.prefooter .right .consent-embed {
    width: 100%;
    min-height: 340px;
}

@media (max-width: 991px) {
    .prefooter .right .consent-embed {
        margin-top: 20px;
    }
}

/* Odkazy v pätičke podstránok */
footer .links a,
footer .links .consent-footer-link {
    color: #fff;
    font-size: 16px;
    margin-right: 25px;
}

/* Pätička homepage — úvodná stránka doteraz žiadnu nemala. Je fixne
   pozicionovaná, aby nezasiahla do jej celoobrazovkového layoutu. */
.home-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    padding: 12px 24px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
}

.home-footer a,
.home-footer .consent-footer-link {
    color: rgba(255, 255, 255, .8);
    text-decoration: underline;
}

.home-footer a:hover,
.home-footer .consent-footer-link:hover {
    color: #fff;
}

/* body.home nastavuje `cursor: none` na všetko (vlastný kurzor).
   Prvky súhlasu musia zostať bežne ovládateľné. */
body.home #consent-banner,
body.home #consent-banner *,
body.home #consent-settings,
body.home #consent-settings *,
body.home .home-footer,
body.home .home-footer * {
    cursor: auto;
}

body.home .consent-btn,
body.home .consent-toggle,
body.home .consent-toggle input,
body.home .consent-footer-link,
body.home .home-footer a {
    cursor: pointer;
}
