/* ================================================================= */
/* =        STYLY PRO STRÁNKU PODMÍNKY LOVU (REDESIGN)           =   */
/* ================================================================= */

/* Reset inline dědictví u překopírovaných SPANů */
.podminkylovu span[style*="vertical-align: inherit"] {
    vertical-align: baseline;
}

/* Kontejner + proměnné pro akcenty (bez vlivu na ostatní stránky) */
.podminkylovu {
    --accent-left: #007bff;
    /* barva levé lišty u LI na desktopu */
    --accent-left-hover: #28a745;
    max-width: 1200px;
    margin: 2rem auto;
    padding: clamp(1rem, 4vw, 2rem);
    background: transparent;
    border: none;
    transition: filter .4s ease;
    /* pro .blurred */
}

.podminkylovu.blurred {
    filter: blur(5px);
    transform: scale(.98);
}

.podminkylovu .main-container {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2rem);
    background: transparent;
    border: 0;
    margin: 0;
    padding: 0.5rem;
}

/* --- Hlavní „prosklená“ karta --- */
.podminkylovu .ramecek {
    background: rgba(2, 2, 2, .55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(250, 206, 12, .3);
    border-radius: 16px;
    padding: clamp(1.5rem, 3vw, 2rem);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .37);
    margin-block-end: 0;
    text-align: left;
}

/* --- Nadpisy uvnitř karet --- */
.podminkylovu h2 {
    font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem);
    color: #f3d9a0;
    text-shadow: var(--text-shadow-nadpis);
    margin: 0 0 1.5rem 0;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(250, 206, 12, .5);
    width: 100%;
    text-align: left;
    line-height: 1.3;
}

.podminkylovu h2::after {
    display: none;
}

/* --- Seznam pravidel --- */
.podminkylovu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.podminkylovu ul li {
    background: #ffffffde;
    border: 1px solid #000;
    /* rámeček */
    border-left: 5px solid var(--accent-left);
    /* barevná lišta vlevo */
    margin-bottom: .5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .04);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: .85rem 1rem;
    line-height: 1.6;
    font-size: .95rem;
    cursor: pointer;
    transition: background-color .6s ease, transform .6s ease, box-shadow .6s ease, border-left-color .6s ease;
    will-change: background-color, transform, box-shadow, border-left-color;
}

.podminkylovu ul li:last-child {
    margin-bottom: 0;
}

.podminkylovu ul li:hover {
    background-color: #fff9e2;
    border-left-color: var(--accent-left-hover);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.podminkylovu ul li i {
    display: none;
}

/* HTML ikony skrýt (ideálně odebrat z HTML) */
.podminkylovu ul li span {
    flex: 1;
    color: #212529;
    text-shadow: none;
    font-weight: 400;
}

.podminkylovu a {
    color: #0056b3;
    text-decoration: underline dotted;
}

/* --- Tabulky (Ceníky) --- */
.podminkylovu table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(.75rem, 1.8vw, .85rem);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #000;
    table-layout: auto;
}

.podminkylovu th,
.podminkylovu td {
    padding: clamp(.5rem, 2vw, .8rem) clamp(.5rem, 2vw, 1rem);
    border: 1px solid #000;
    word-wrap: break-word;
    hyphens: auto;
    transition: background-color .5s ease, color .5s ease;
    will-change: background-color, color;
}

.podminkylovu th {
    text-align: center;
    color: #000;
    background: #abf1e8;
    font-size: clamp(.75rem, 2.2vw, .95rem);
    font-weight: 600;
}

.podminkylovu th span {
    color: #000;
    font-weight: 900;
}

.podminkylovu td {
    text-align: left;
    color: #000;
    background: #aff793fb;
    font-weight: 400;
}

.podminkylovu tbody tr {
    cursor: pointer;
}

.podminkylovu tbody tr:hover td {
    background: rgba(250, 251, 185, .702);
}

.podminkylovu .highlight {
    color: #000;
    white-space: nowrap;
}

/* ================================================================= */
/* =           STYLY PRO "FOCUS VIEW" (MODÁL)                      = */
/* ================================================================= */
.focus-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease, visibility .4s ease;
}

.focus-overlay.active {
    opacity: 1;
    visibility: visible;
}

.focus-content {
    background: rgba(14, 59, 70, .95);
    border: 1px solid rgba(250, 206, 12, .5);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
    max-width: 600px;
    width: 100%;
    position: relative;
    transform: scale(.9);
    transition: transform .4s cubic-bezier(.25, .8, .25, 1);
    text-align: center;
}

.focus-overlay.active .focus-content {
    transform: scale(1);
}

.focus-content .focused-item {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #f5f5f5;
    overflow-wrap: anywhere;
}

.focus-content .focused-item::before {
    content: '\f101';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #ffde59;
    display: block;
    font-size: 2rem;
    margin-bottom: 1rem;
    transform: rotate(90deg);
}

.focus-content .focused-table-view {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.focus-content .focused-table-view li {
    padding: .5rem 0;
    border-bottom: 1px solid rgba(250, 206, 12, .2);
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: #f5f5f5;
    overflow-wrap: anywhere;
}

.focus-content .focused-table-view li:last-child {
    border-bottom: 0;
}

.focus-content .focused-table-view strong {
    color: #f3fd9d;
    padding-right: 1rem;
}

.focus-close-btn {
    position: absolute;
    top: -5px;
    right: 5px;
    width: 40px;
    height: 40px;
    color: #ffbb01;
    font-size: 24px;
    line-height: 38px;
    text-align: center;
    cursor: pointer;
    transition: transform .3s ease, background-color .3s ease;
}

/* ================================================================= */
/* =                       RESPONZIVITA                            = */
/* ================================================================= */

/* ≤ 768 px – mobilní layout, ale tabulky necháváme „tabulkové“ */
@media (max-width: 768px) {
    .podminkylovu {
        padding: 0;
        margin-top: 1rem;
        --accent-left: #65a5ee;
    }

    /* světlejší lišta na mobilech */

    .podminkylovu h2 {
        font-size: clamp(1rem, 5vw, 1.3rem);
        margin-bottom: 1rem;
        text-align: center;
    }

    .podminkylovu ul li {
        background: rgba(255, 255, 255, .87);
        border: 1px solid rgba(0, 0, 0, .12);
        border-left: 5px solid var(--accent-left);
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: .8rem;
        margin-bottom: .8rem;
        box-shadow: 0 3px 6px rgba(0, 0, 0, .1);
    }

    /* tabulky beze změny struktury */
    .podminkylovu table {
        width: 100%;
        overflow: hidden;
    }

    .podminkylovu thead {
        display: table-header-group;
    }

    .podminkylovu tbody {
        display: table-row-group;
    }

    .podminkylovu tbody tr {
        display: table-row;
        background: inherit;
        border: 0;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        position: static;
    }

    .podminkylovu td,
    .podminkylovu th {
        display: table-cell;
        position: static;
        border: 1px solid #000;
    }

    .podminkylovu th {
        text-align: center;
        background: #abf1e8;
        color: #000;
    }

    .podminkylovu th span {
        color: #0d0e0d;
    }

    .podminkylovu td {
        text-align: left;
        background: rgba(175, 247, 147, .984);
        color: #000;
        border-bottom: 1px solid #000;
    }

    .podminkylovu .ramecek {
        overflow: visible;
    }

    /* Modal – trochu kompaktnější */
    .focus-content {
        margin: 0;
        padding: .5rem;
        max-width: calc(100vw - 2rem);
    }
}



/* ≤ 480 px – extra mobil: modal + kompaktnější li */
@media (max-width: 480px) {
    .podminkylovu .main-container {
        padding: 0;
    }
    .focus-overlay {
        padding: .5rem;
    }

    .focus-content {
        padding: 1rem;
        max-width: 92vw;
        width: 92vw;
        text-align: left;
        max-height: 80vh;
        overflow-y: auto;
    }

    .focus-content .focused-item {
        font-size: 1rem;
        line-height: 1.5;
    }

    .focus-content .focused-item::before {
        font-size: .6em;
        margin-bottom: .5rem;
    }

    .focus-content .focused-table-view li {
        font-size: .95rem;
        flex-direction: column;
        align-items: flex-start;
        gap: .25rem;
    }

    .focus-content .focused-table-view strong {
        padding-right: 0;
    }

    /* kompaktnější seznam */
    .podminkylovu .ramecek {
        border-radius: 0;
        padding: 0.2rem 0.2rem 0.5rem 0.2rem;
        margin-bottom: 1rem;
    }

    .podminkylovu h2 {
        font-size: clamp(.9rem, 4vw, 1.1rem);
        margin-bottom: .8rem;
    }

    .podminkylovu ul li {
        /* Nejprve zúžíme všechny strany, pak znovu nastavíme levou lištu */
        border-width: 1px; /* zúží i levou hranu -> hned níže znovu rozšíříme */
        border-left-width: 3px; /* zachová zvýraznění vlevo na mobilech */
        /* Pokud na mobilech chceš užší akcent (např. 3px), změň na 3px */
        padding: 0.3rem;
        gap: 0.2rem;
        margin-bottom: 0.3rem;
        font-size: 0.85rem;
    }

    .podminkylovu table {
        display: block;
        width: 100%;
        overflow-x: hidden;
        border: 0;
        margin: 0;
        padding: 0;
        border-radius: 0;
    }

    .podminkylovu .tabulka-povolenky,
    .podminkylovu .tabulka-miry {
        table-layout: auto !important;
    }

    .podminkylovu .table-responsive>table {
        min-width: 0 !important;
    }

    .podminkylovu thead {
        display: none;
    }

    .podminkylovu tbody,
    .podminkylovu tbody tr {
        display: block;
    }

    .podminkylovu tbody tr {
        margin-bottom: 1rem;
        padding: 0;
        position: relative;
    }

    .podminkylovu td {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        text-align: left !important;
        background: transparent;
        border: 0;
        color: #000;
        padding: 0;
        margin-bottom: 0;
        font-size: clamp(.75rem, 3.5vw, .85rem);
        line-height: 1.35;
        overflow-wrap: anywhere;
        word-break: break-word;
        hyphens: auto;
        box-sizing: border-box;
    }

    .podminkylovu td:last-child {
        border-bottom: 0;
        margin-bottom: 0;
    }

    .podminkylovu td::before {
        content: attr(data-label) !important;
        display: block !important;
        font-weight: 700;
        color: #0b2b31;
        padding: .4rem .2rem;
        background: #abf1e8;
        font-size: clamp(calc(.65rem + 3px), 2.8vw, calc(.75rem + 3px));
        line-height: 1.2;
        white-space: normal !important;
        text-overflow: clip;
        margin: 0;
        box-sizing: border-box;
    }

    .podminkylovu td span {
        padding: .25rem .15rem;
        background-color: #c8f3a0;
        gap: 0;
        flex-grow: 1;
        text-align: left;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        hyphens: auto;
    }

    .podminkylovu td>span span {
        background: transparent;
        padding: 0;
    }

    /* Vlastní popisky sloupců pro dvě tabulky */
    .podminkylovu .tabulka-povolenky tbody td:nth-child(1)::before {
        content: "Oprávnění:" !important;
    }

    .podminkylovu .tabulka-povolenky tbody td:nth-child(2)::before {
        content: "Cena:" !important;
    }

    .podminkylovu .tabulka-povolenky tbody td:nth-child(3)::before {
        content: "Čas:" !important;
    }

    .podminkylovu .tabulka-miry tbody td:nth-child(1)::before {
        content: "Druh:" !important;
    }

    .podminkylovu .tabulka-miry tbody td:nth-child(2)::before {
        content: "Míra:" !important;
    }

    .podminkylovu .tabulka-miry tbody td:nth-child(3)::before {
        content: "Cena:" !important;
    }

    .podminkylovu .ramecek {
        overflow: visible;
    }

}

/* ≤ 320 px – modal ještě kompaktnější */
@media (max-width: 320px) {
    .focus-content {
        padding: .75rem;
    }

    .focus-content .focused-item {
        font-size: .8rem;
    }

    .focus-content .focused-table-view li {
        font-size: .6rem;
    }

    .focus-close-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
        line-height: 26px;
    }
}

/* === MOBILE TYPOGRAPHY FIX (append at end of file) =================== */
@media (max-width: 767.98px), (pointer: coarse) {
    /* Spany v bodech pravidel – na mobilech z 400 -> 500 */
    :where(.podminkylovu ul li) :where(span) {
        font-weight: 500 !important;
    }
}