/* Cookie consent — lišta a modal */

.cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(20, 20, 20, 0.96);
    color: #fff;
    padding: 20px;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.25s ease-out;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.cookie-bar.is-visible {
    transform: translateY(0);
}
.cookie-bar__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-bar__text {
    flex: 1 1 320px;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}
.cookie-bar__text a {
    color: #E65F35;
    text-decoration: underline;
}
.cookie-bar__buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    background: none;
    color: inherit;
    text-decoration: none;
    line-height: 1.2;
    font-family: inherit;
}
.cookie-btn--primary {
    background: #E65F35;
    color: #fff;
    border-color: #E65F35;
}
.cookie-btn--primary:hover {
    background: #d35226;
    border-color: #d35226;
}
.cookie-btn--secondary {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.cookie-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}
.cookie-btn--link {
    background: none;
    border: none;
    color: #fff;
    text-decoration: underline;
    padding: 10px 4px;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cookie-modal.is-visible {
    display: flex;
}
.cookie-modal__box {
    background: #fff;
    color: #222;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.cookie-modal__title {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
}
.cookie-modal__category {
    border-top: 1px solid #e5e5e5;
    padding: 15px 0;
}
.cookie-modal__category label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}
/* Override agresivního globálního resetu v main.css:
   `input { width:100%; -webkit-appearance:none; display:block }`
   bez tohoto se checkbox roztáhne přes celý řádek a vytlačí text mimo okno. */
.cookie-modal__category input[type="checkbox"] {
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: auto;
    width: 16px;
    min-width: 16px;
    height: 16px;
    margin: 3px 0 0 0;
    padding: 0;
    box-sizing: border-box;
    flex: 0 0 auto;
    display: inline-block;
}
.cookie-modal__category input[type="checkbox"]:disabled {
    cursor: not-allowed;
}
.cookie-modal__category label > span {
    flex: 1 1 auto;
    min-width: 0;
}
.cookie-modal__category-name {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}
.cookie-modal__category-desc {
    font-size: 13px;
    color: #555;
    margin: 0;
    line-height: 1.5;
}
.cookie-modal__footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    flex-wrap: wrap;
}
.cookie-modal__footer .cookie-btn--secondary {
    color: #222;
    border-color: #222;
}
.cookie-modal__footer .cookie-btn--secondary:hover {
    background: #f5f5f5;
}

.cookie-placeholder {
    display: block;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #555;
    border-radius: 4px;
    line-height: 1.5;
}
.cookie-placeholder a {
    color: #E65F35;
    text-decoration: underline;
    cursor: pointer;
}

/* vypadá stejně jako odkaz "Media Populus" v patičce (.vydavatelclick) */
.cookie-footer-link {
    display: inline;
    color: #d3d2cc;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font: inherit;
    vertical-align: baseline;
}
.cookie-footer-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    /* kompaktní lišta — ať nezabírá půlku obrazovky */
    .cookie-bar {
        padding: 12px 14px;
    }
    .cookie-bar__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .cookie-bar__text {
        /* base má flex:1 1 320px → ve sloupci by to byla výška 320px */
        flex: 0 0 auto;
        font-size: 12px;
        line-height: 1.4;
    }
    .cookie-bar__buttons {
        gap: 8px;
    }
    /* Přijmout / Odmítnout vedle sebe, Nastavení jako úzký odkaz */
    .cookie-btn--primary,
    .cookie-btn--secondary {
        flex: 1 1 0;
        text-align: center;
        padding: 9px 10px;
        font-size: 13px;
    }
    .cookie-btn--link {
        flex: 1 1 100%;
        order: 1;
        text-align: center;
        padding: 4px;
        font-size: 12px;
    }
    .cookie-modal__box {
        padding: 20px;
    }
    .cookie-modal__footer {
        gap: 8px;
    }
    .cookie-modal__footer .cookie-btn {
        flex: 1 1 0;
        text-align: center;
    }
}

/* Stránka /cookies/ — neutralizace dekorativních theme stylů z main.css
   (.composer .text h1/h2/h3 mají uppercase 45/35px, line-height:1, žádné
   marginy a h3 ::before/::after pruhy přes celou šířku). Selektory drží
   vyšší specificitu než .composer .text h3 (0,3,1 > 0,2,1). */
.composer .text.cookies-policy {
    line-height: 1.6;
}
.composer .text.cookies-policy h1 {
    font-size: 32px;
    line-height: 1.3;
    text-transform: none;
    margin: 0 0 30px;
}
.composer .text.cookies-policy h2 {
    font-size: 24px;
    line-height: 1.3;
    text-transform: none;
    margin: 36px 0 12px;
}
.composer .text.cookies-policy h3 {
    position: static;
    font-size: 18px;
    line-height: 1.3;
    text-transform: none;
    margin: 24px 0 10px;
}
.composer .text.cookies-policy h3:before,
.composer .text.cookies-policy h3:after {
    content: none;
    display: none;
}
.composer .text.cookies-policy p {
    margin: 0 0 14px;
    line-height: 1.6;
}
.composer .text.cookies-policy p:first-child {
    margin-top: 0;
}
.composer .text.cookies-policy a {
    color: #E65F35;
    text-decoration: underline;
}
.composer .text.cookies-policy code {
    font-family: monospace;
    font-size: 13px;
    background: #f0f0f0;
    padding: 1px 5px;
    border-radius: 3px;
}
.composer .text.cookies-policy table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 20px;
    font-size: 14px;
}
.composer .text.cookies-policy th,
.composer .text.cookies-policy td {
    border: 1px solid #ccc;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
}
.composer .text.cookies-policy th {
    background: #f0f0f0;
    font-weight: 600;
}
.composer .text.cookies-policy .cookie-btn {
    text-decoration: none;
}
.composer .text.cookies-policy .cookie-btn--primary {
    color: #fff;
}
