/* ==========================================================================
   Cookie lišta + nastavení soukromí — Školící a výcvikové centrum ASKLÉPIOS
   Barvy a font přebrány z hlavního stylu webu (styly/style.css):
   #07598C (modrá), #36383D (tmavá), #F8F8F8 (světlá), font 'Dosis'
   ========================================================================== */

#cookie-banner, #cookie-modal { font-family: 'Dosis', sans-serif; }

/* -------------------------------------------------------------------- */
/* Spodní lišta                                                          */
/* -------------------------------------------------------------------- */
#cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99000;
    color: #36383D;
    background: #F8F8F8;
    border-top: 1px solid rgba(54,56,61,.15);
    box-shadow: 0 -10px 30px rgba(4,57,92,.12);
    transform: translateY(110%);
    transition: transform .6s cubic-bezier(.2,.8,.3,1);
}
#cookie-banner.cookie-banner--visible { transform: translateY(0); }

#cookie-banner::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    width: 60px;
    height: 1px;
    margin-left: -30px;
    background: #07598C;
}

.cookie-banner-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 22px 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.cookie-banner-text { flex: 1 1 420px; min-width: 260px; }
.cookie-banner-text p { margin: 0; font-size: .95em; line-height: 1.5; }
.cookie-banner-text p span { font-weight: 600; }
.cookie-banner-text a { color: #07598C; text-decoration: underline; text-decoration-color: rgba(7,89,140,.35); }
.cookie-banner-text a:hover { text-decoration-color: #07598C; }

.cookie-banner-actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* -------------------------------------------------------------------- */
/* Tlačítka - navazují na styl .button z hlavního webu                   */
/* -------------------------------------------------------------------- */
.cookie-btn {
    display: inline-block;
    padding: 10px 18px;
    font-family: 'Dosis', sans-serif;
    font-size: .85em;
    font-weight: 600;
    letter-spacing: .5px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    background: transparent;
    transition: all .3s ease-in-out;
    white-space: nowrap;
}
.cookie-btn-text {
    color: #36383D;
    padding: 10px 4px;
    border: none;
    border-bottom: 1px solid rgba(54,56,61,.3);
}
.cookie-btn-text:hover { color: #07598C; border-bottom-color: #07598C; }

.cookie-btn-outline {
    color: #36383D;
    border: 1px solid rgba(54,56,61,.3);
}
.cookie-btn-outline:hover { color: #07598C; border-color: #36383D; }

.cookie-btn-primary {
    color: #F8F8F8;
    background: #07598C;
    border: 1px solid #07598C;
}
.cookie-btn-primary:hover { background: #054569; border-color: #054569; }

/* -------------------------------------------------------------------- */
/* Modální okno s nastavením                                             */
/* -------------------------------------------------------------------- */
#cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 99500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20,26,33,.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}
#cookie-modal.cookie-modal--open { opacity: 1; visibility: visible; }

.cookie-modal-panel {
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    color: #36383D;
    background: linear-gradient(315deg, #EFEFE8, #F8F8F8);
    box-shadow: 0 20px 60px rgba(4,57,92,.3);
    transform: translateY(24px) scale(.97);
    opacity: 0;
    transition: transform .4s cubic-bezier(.2,.8,.3,1), opacity .4s ease;
}
#cookie-modal.cookie-modal--open .cookie-modal-panel { transform: translateY(0) scale(1); opacity: 1; }

.cookie-modal-head {
    position: relative;
    padding: 30px 60px 20px 30px;
    border-bottom: 1px solid rgba(54,56,61,.12);
}
.cookie-modal-head h2 { margin: 0; font-size: 1.4em; font-weight: 400; }
.cookie-modal-head h2 span { font-weight: 800; }

.cookie-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(54,56,61,.3);
    background: transparent;
    color: #36383D;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all .3s ease-in-out;
}
.cookie-modal-close:hover { color: #F8F8F8; background: #07598C; border-color: #07598C; }

.cookie-modal-body { padding: 10px 30px 20px 30px; }
.cookie-modal-body > p { font-size: .95em; line-height: 1.5; margin: 10px 0 20px 0; }

.cookie-category {
    padding: 18px 0;
    border-bottom: 1px solid rgba(54,56,61,.12);
}
.cookie-category:last-child { border-bottom: none; }

.cookie-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.cookie-category-head h3 {
    margin: 0;
    font-size: 1.05em;
    font-weight: 600;
    color: #36383D;
}
.cookie-category p {
    margin: 8px 0 0 0;
    font-size: .85em;
    line-height: 1.5;
    color: rgba(54,56,61,.8);
    padding-right: 30px;
}
.cookie-category-locked {
    font-size: .7em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #07598C;
    white-space: nowrap;
}

/* Přepínač */
.cookie-switch {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 46px;
    height: 24px;
}
.cookie-switch input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.cookie-switch .cookie-slider {
    position: absolute;
    inset: 0;
    background: rgba(54,56,61,.18);
    transition: background .25s ease-in-out;
}
.cookie-switch .cookie-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #F8F8F8;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    transition: transform .25s ease-in-out;
}
.cookie-switch input:checked + .cookie-slider { background: #07598C; }
.cookie-switch input:checked + .cookie-slider::before { transform: translateX(22px); }
.cookie-switch input:disabled { cursor: not-allowed; }
.cookie-switch input:disabled + .cookie-slider { opacity: .6; }
.cookie-switch input:focus-visible + .cookie-slider { outline: 2px solid #07598C; outline-offset: 2px; }

.cookie-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px 30px 30px 30px;
}

/* -------------------------------------------------------------------- */
/* Trvalá záložka pro opětovné otevření nastavení (viditelná i na mobilu, */
/* kde patička s odkazem "Nastavení cookies" není zobrazená)             */
/* -------------------------------------------------------------------- */
#cookie-reopen-tab {
    position: fixed;
    left: 0;
    bottom: 24px;
    z-index: 98500;
    padding: 10px 16px 10px 14px;
    font-family: 'Dosis', sans-serif;
    font-size: .72em;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #36383D;
    background: #F8F8F8;
    border: 1px solid rgba(54,56,61,.3);
    border-left: none;
    box-shadow: 2px 4px 14px rgba(4,57,92,.15);
    cursor: pointer;
    transition: color .25s ease, background .25s ease, border-color .25s ease;
}
#cookie-reopen-tab:hover { color: #F8F8F8; background: #07598C; border-color: #07598C; }
#cookie-reopen-tab[hidden] { display: none; }

@media screen and (max-width: 767px) {
    .cookie-banner-inner { padding: 18px 20px; }
    .cookie-banner-actions { width: 100%; justify-content: flex-start; }
    .cookie-modal-footer { justify-content: stretch; }
    .cookie-modal-footer .cookie-btn { flex: 1 1 auto; }
    .cookie-category p { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    #cookie-banner, .cookie-modal-panel, #cookie-modal { transition: opacity .3s ease !important; transform: none !important; }
}
