/* ============================================================
   Penzion a restaurace U Maryny — Cookies (souhlas + nastavení)
   Autor: Rho:Technology
   Navazuje na vizuální styl webu (Barlow, #9E2901, #BFBA6B, #262626)
   ============================================================ */

.ck-root {
    /* --- Barvy webu --- */
    --ck-dark: #262626;
    --ck-dark-deep: #1e1c1d;
    --ck-dark-soft: #303030;
    --ck-red: #9E2901;
    --ck-olive: #BFBA6B;
    --ck-light: #EFF3F2;
    --ck-text: #262626;

    --ck-ease: cubic-bezier(0.76, 0, 0.24, 1);

    font-family: 'Barlow', sans-serif;
    font-weight: 300;
    text-align: left;
}

/* Zámek scrollování při otevřeném nastavení */
html.ck-locked,
html.ck-locked body {
    overflow: hidden !important;
}

/* ============================================================
   1) Lišta se souhlasem
   ============================================================ */
.ck-bar {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 9000;
    background: var(--ck-dark);
    border-top: 1px solid rgba(191, 186, 107, 0.35);
    box-shadow: 0 -18px 45px rgba(0, 0, 0, 0.35);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.6s var(--ck-ease), opacity 0.4s ease;
    will-change: transform;
}

/* Cihlovo-olivová linka nahoře – motiv lineas.fw.png */
.ck-bar::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        var(--ck-red) 0%,
        var(--ck-olive) 50%,
        var(--ck-red) 100%);
}

.ck-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.ck-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 1100px;
    max-width: calc(100% - 60px);
    margin: 0 auto;
    padding: 28px 0;
}

.ck-bar__text {
    flex: 1 1 auto;
    color: var(--ck-light);
}

.ck-bar__title {
    font-size: 26px;
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 10px 0;
    letter-spacing: 0.02em;
}

.ck-bar__title span {
    font-weight: 600;
    color: var(--ck-olive);
}

.ck-bar__desc {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    color: rgba(239, 243, 242, 0.78);
    max-width: 640px;
}

.ck-bar__desc a {
    color: var(--ck-light);
    text-decoration: 1px underline var(--ck-olive);
}

.ck-bar__desc a:hover {
    text-decoration: 2px underline var(--ck-red);
}

.ck-bar__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

/* ============================================================
   2) Tlačítka – motiv .button / .button-corner z webu
   ============================================================ */
.ck-btn {
    position: relative;
    display: inline-block;
    min-width: 190px;
    padding: 15px 22px;
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.35s ease-in-out;
}

/* Posunutý rámeček jako u .button-corner */
.ck-btn::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: all 0.35s ease-in-out;
}

.ck-btn--primary {
    color: var(--ck-light);
    background: var(--ck-red);
}

.ck-btn--primary::after { border: 1px solid var(--ck-olive); }
.ck-btn--primary:hover { color: #fff; }
.ck-btn--primary:hover::after { top: 0; left: 0; border-color: rgba(191, 186, 107, 0.9); }

.ck-btn--ghost {
    color: var(--ck-light);
    background: transparent;
    border: 1px solid rgba(239, 243, 242, 0.35);
}

.ck-btn--ghost::after { border: 1px solid transparent; }
.ck-btn--ghost:hover { color: #fff; border-color: var(--ck-olive); background: rgba(255, 255, 255, 0.04); }

/* Textový odkaz "Nastavení" */
.ck-link {
    padding: 0;
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: rgba(239, 243, 242, 0.75);
    background: none;
    border: none;
    border-bottom: 1px solid rgba(191, 186, 107, 0.6);
    cursor: pointer;
    transition: all 0.35s ease-in-out;
}

.ck-link:hover {
    color: #fff;
    border-bottom-color: var(--ck-red);
}

.ck-btn:focus-visible,
.ck-link:focus-visible,
.ck-switch input:focus-visible + .ck-switch__track {
    outline: 2px solid var(--ck-olive);
    outline-offset: 3px;
}

/* ============================================================
   3) Modal s nastavením
   ============================================================ */
.ck-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(30, 28, 29, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.ck-modal.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0s linear 0s;
}

.ck-modal__panel {
    position: relative;
    width: 760px;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    transform: translateY(28px) scale(0.985);
    transition: transform 0.5s var(--ck-ease);
}

.ck-modal.is-open .ck-modal__panel {
    transform: translateY(0) scale(1);
}

/* Posunutý olivový rámeček kolem panelu */
.ck-modal__panel::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(191, 186, 107, 0.5);
    pointer-events: none;
}

/* --- Hlavička --- */
.ck-modal__head {
    flex: 0 0 auto;
    position: relative;
    padding: 26px 70px 24px 40px;
    background: var(--ck-dark);
    color: var(--ck-light);
}

.ck-modal__title {
    font-size: 26px;
    font-weight: 400;
    line-height: 1.2;
    margin: 0;
    letter-spacing: 0.02em;
}

.ck-modal__title span {
    font-weight: 600;
    color: var(--ck-olive);
}

.ck-modal__close {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    padding: 0;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.35s ease-in-out;
}

.ck-modal__close:hover { background: var(--ck-olive); }

.ck-modal__close::before,
.ck-modal__close::after {
    content: '';
    position: absolute;
    top: 24px;
    left: 15px;
    width: 20px;
    height: 2px;
    background: var(--ck-dark);
}

.ck-modal__close::before { transform: rotate(45deg); }
.ck-modal__close::after  { transform: rotate(-45deg); }

/* --- Tělo --- */
.ck-modal__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 34px 40px 10px 40px;
    color: var(--ck-text);
}

.ck-modal__intro {
    font-size: 17px;
    line-height: 1.55;
    margin: 0 0 8px 0;
}

.ck-modal__intro a {
    color: #000;
    text-decoration: 1px underline var(--ck-olive);
}

.ck-modal__intro a:hover { text-decoration: 2px underline var(--ck-red); }

.ck-divider {
    width: 100%;
    height: 1px;
    margin: 24px 0;
    background: linear-gradient(90deg,
        var(--ck-red) 0%,
        rgba(158, 41, 1, 0.15) 60%,
        rgba(158, 41, 1, 0) 100%);
}

/* --- Kategorie --- */
.ck-cat {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 22px 0;
}

.ck-cat:first-of-type { border-top: none; padding-top: 0; }

.ck-cat__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.ck-cat__name {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 6px 0;
    color: var(--ck-text);
}

.ck-cat__badge {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    vertical-align: 3px;
    color: #fff;
    background: var(--ck-olive);
}

.ck-cat__desc {
    font-size: 16px;
    line-height: 1.55;
    margin: 0;
    color: #4a4a4a;
}

.ck-cat__detail-toggle {
    margin-top: 12px;
    padding: 0;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--ck-red);
    background: none;
    border: none;
    border-bottom: 1px solid rgba(191, 186, 107, 0.8);
    cursor: pointer;
    transition: all 0.35s ease-in-out;
}

.ck-cat__detail-toggle:hover { color: var(--ck-text); border-bottom-color: var(--ck-red); }

/* --- Tabulka konkrétních cookies (motiv .linea-a / .linea-b) --- */
.ck-cat__detail {
    display: none;
    margin-top: 16px;
}

.ck-cat.is-expanded .ck-cat__detail { display: block; }

.ck-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.ck-table th {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-align: left;
    color: #fff;
    background: var(--ck-dark);
}

.ck-table td {
    padding: 9px 10px;
    vertical-align: top;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ck-table tbody tr:nth-child(odd)  { background: rgba(0, 0, 0, 0.04); }
.ck-table tbody tr:nth-child(even) { background: rgba(0, 0, 0, 0.08); }
.ck-table tbody tr:hover           { background: rgba(158, 41, 1, 0.12); }

.ck-table td:first-child { font-weight: 600; white-space: nowrap; }
.ck-table td:last-child  { white-space: nowrap; color: var(--ck-red); }

/* --- Přepínač --- */
.ck-switch {
    flex: 0 0 auto;
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
    margin-top: 2px;
}

.ck-switch input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.ck-switch__track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #c9c9c9;
    transition: background 0.35s ease-in-out;
    pointer-events: none;
}

.ck-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    transition: transform 0.35s var(--ck-ease);
}

.ck-switch input:checked + .ck-switch__track { background: var(--ck-red); }
.ck-switch input:checked + .ck-switch__track::after { transform: translateX(26px); }

.ck-switch input:disabled { cursor: not-allowed; }
.ck-switch input:disabled + .ck-switch__track { background: var(--ck-olive); }
.ck-switch input:disabled + .ck-switch__track::after { transform: translateX(26px); opacity: 0.85; }

/* --- Patička modalu --- */
.ck-modal__foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 26px;
    padding: 24px 40px 30px 40px;
    background: var(--ck-dark-soft);
}

.ck-modal__foot .ck-btn { min-width: 170px; }

/* ============================================================
   4) Plovoucí tlačítko pro znovuotevření nastavení
   ============================================================ */
.ck-fab {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 8500;
    width: 46px;
    height: 46px;
    padding: 0;
    background: var(--ck-dark);
    border: 1px solid rgba(191, 186, 107, 0.45);
    cursor: pointer;
    opacity: 0;
    transform: translateY(14px);
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s var(--ck-ease),
                background 0.35s ease-in-out, border-color 0.35s ease-in-out,
                visibility 0s linear 0.4s;
}

.ck-fab.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
}

.ck-fab:hover { background: var(--ck-red); border-color: var(--ck-olive); }

.ck-fab svg {
    display: block;
    width: 22px;
    height: 22px;
    margin: 11px auto;
    fill: var(--ck-olive);
    transition: fill 0.35s ease-in-out;
}

.ck-fab:hover svg { fill: #fff; }

/* ============================================================
   Tablet
   ============================================================ */
@media screen and (max-width: 1099px) {
    .ck-bar__inner { gap: 28px; padding: 24px 0; max-width: calc(100% - 40px); }
    .ck-bar__title { font-size: 22px; }
    .ck-bar__actions { gap: 16px; }
    .ck-btn { min-width: 150px; padding: 13px 16px; font-size: 15px; }
    .ck-modal__head { padding: 22px 60px 20px 30px; }
    .ck-modal__body { padding: 28px 30px 10px 30px; }
    .ck-modal__foot { padding: 20px 30px 26px 30px; }
}

/* ============================================================
   Mobil
   ============================================================ */
@media screen and (max-width: 767px) {
    .ck-bar__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 22px;
        padding: 24px 0 26px 0;
        max-width: calc(100% - 36px);
    }

    .ck-bar__title { font-size: 20px; }
    .ck-bar__desc { font-size: 15px; }

    .ck-bar__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .ck-btn { width: 100%; min-width: 0; }
    .ck-btn::after { top: 6px; left: 6px; }

    .ck-modal { padding: 16px; align-items: flex-end; }
    .ck-modal__panel { max-height: 92vh; }
    .ck-modal__panel::before { display: none; }
    .ck-modal__head { padding: 20px 60px 18px 22px; }
    .ck-modal__title { font-size: 21px; }
    .ck-modal__body { padding: 24px 22px 6px 22px; }

    .ck-cat__head { flex-direction: row; gap: 16px; }
    .ck-cat__name { font-size: 19px; }
    .ck-cat__desc { font-size: 15px; }

    .ck-table { font-size: 13px; }
    .ck-table th, .ck-table td { padding: 7px 8px; }
    .ck-table td:last-child { white-space: normal; }

    .ck-modal__foot { flex-direction: column-reverse; align-items: stretch; gap: 16px; padding: 20px 22px 24px 22px; }
    .ck-modal__foot .ck-btn { width: 100%; }

    .ck-fab { left: 14px; bottom: 14px; }
}

/* Velmi úzké displeje – tabulka se odroluje vodorovně */
@media screen and (max-width: 479px) {
    .ck-cat__detail { overflow-x: auto; }
    .ck-table { min-width: 380px; }
}

/* ============================================================
   Omezený pohyb
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .ck-bar,
    .ck-modal,
    .ck-modal__panel,
    .ck-fab {
        transition-duration: 0.15s !important;
    }

    .ck-bar { transform: none; }
    .ck-modal__panel { transform: none; }
    .ck-fab { transform: none; }
}
