/* Hypoteky Ai - REVOLUTIONARY CHAT LAYOUT v6.0 */
:root { 
    --accent-color: #2563eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --sidebar-width: 360px;
}

/* Reset a základy */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body { 
    font-family: 'Inter', sans-serif; 
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

/* ============================================
   KRITICKÉ - CHAT INPUT VISIBILITY
   ============================================ */
#permanent-chat-input {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 9999 !important;
    transform: none !important;
    -webkit-transform: none !important;
    pointer-events: auto !important;
    touch-action: auto !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    font-size: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#permanent-chat-input:focus,
#permanent-chat-input:active,
#permanent-chat-input:hover {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    font-size: 16px !important;
}

#chat-input-footer {
    position: relative !important;
    z-index: 10000 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    background: white !important;
    transform: none !important;
    -webkit-transform: none !important;
}

/* ============================================
   SIDEBAR - NOVÝ RESPONZIVNÍ PŘÍSTUP
   ============================================ */

/* Na desktopu je sidebar součástí gridu, styly jsou v JS */
@media (min-width: 1024px) {
    #sidebar-container {
        width: 100%;
    }
    /* Dočasně skryjeme toggle, jehož logika byla navázána na fixed pozicování */
    .sidebar-toggle, .sidebar-mini-preview {
        display: none;
    }
    #sidebar-container.minimized, #sidebar-container.hidden {
        transform: none;
    }
}


/* Na mobilu a tabletu funguje jako BOTTOM SHEET (původní chování) */
@media (max-width: 1023px) {
    #sidebar-container {
        position: fixed !important;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: 50vh;
        max-height: 80vh;
        background: white;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
        z-index: 1000;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(100%); /* Start hidden */
        overflow-y: auto;
        border-top: 2px solid #e5e7eb;
        border-radius: 16px 16px 0 0;
    }

    #sidebar-container.visible {
        transform: translateY(0);
    }
    
    #sidebar-container.minimized {
        transform: translateY(calc(100% - 56px));
    }
    
    #sidebar-container.hidden {
        transform: translateY(100%);
    }

    .sidebar-toggle {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: -40px;
        border: 2px solid #e5e7eb;
        border-bottom: none;
        border-radius: 8px 8px 0 0;
        width: 60px;
        height: 40px;
        background: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1;
    }
        
    #sidebar-container.minimized .sidebar-toggle svg {
        transform: rotate(0deg);
    }
    
    #sidebar-container:not(.minimized) .sidebar-toggle svg {
        transform: rotate(180deg);
    }
    
    .sidebar-mini-preview {
        display: none;
    }
}


/* ============================================
   CHAT LAYOUT - FULLSCREEN MODE
   ============================================ */

/* Chat wrapper zabírá celou šířku, odsazení je řešeno gridem */
#ai-chat-wrapper {
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    margin-right: 0; /* Odsazení je zrušeno */
}


#chat-messages-wrapper {
    position: relative !important;
    z-index: 1 !important;
}

#chat-messages {
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px;
}

/* ============================================
   KOMPAKTNÍ SIDEBAR DESIGN
   ============================================ */

.plan-summary-card {
    background: linear-gradient(135deg, #eff6ff 0%, #f9fafb 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #bfdbfe;
}

.plan-summary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.plan-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #e5e7eb;
}

.plan-summary-row:last-child {
    border-bottom: none;
}

.plan-summary-label {
    color: #6b7280;
}

.plan-summary-value {
    font-weight: 600;
    color: #1f2937;
}

.plan-summary-highlight {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    text-align: center;
    padding: 12px 0;
}

/* Kompaktní akční tlačítka */
.plan-action-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.plan-action-compact:hover {
    background: #f9fafb;
    border-color: var(--accent-color);
    transform: translateX(-2px);
}

.plan-action-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Expand/collapse sections */
.plan-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 8px;
}

.plan-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.plan-section-content.expanded {
    max-height: 500px;
}

/* ============================================
   NAVIGACE
   ============================================ */
.nav-link { 
    color: #4b5563; 
    transition: color 0.2s ease-in-out;
    font-weight: 500;
}
.nav-link:hover { color: var(--accent-color); }

.nav-btn { 
    background-color: var(--accent-color); 
    color: white; 
    font-weight: 600; 
    padding: 10px 20px; 
    border-radius: 8px; 
    transition: all 0.2s ease; 
    border: none; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    white-space: nowrap;
}
.nav-btn:hover { 
    background-color: #1d4ed8; 
    transform: translateY(-1px); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); 
}
.nav-btn:disabled { 
    background-color: #9ca3af; 
    cursor: not-allowed; 
    transform: none; 
    box-shadow: none; 
}

/* ============================================
   BADGES
   ============================================ */
.badge { 
    padding: 4px 12px; 
    border-radius: 9999px; 
    font-weight: 600; 
    font-size: 0.7rem; 
    display: inline-block; 
    position: absolute; 
    top: 0.875rem; 
    left: 0.875rem;
}
.badge-yellow { background-color: #fef9c3; color: #ca8a04; }
.badge-blue { background-color: #dbeafe; color: var(--accent-color); }
.badge-purple { background-color: #ede9fe; color: #7c3aed; }

/* ============================================
   FORMULÁŘOVÉ PRVKY
   ============================================ */
.modern-input, .modern-select { 
    width: 100%; 
    background: #f9fafb; 
    border: 1px solid #d1d5db; 
    color: #111827; 
    padding: 10px 14px; 
    border-radius: 8px; 
    transition: all 0.2s; 
    font-size: 0.9375rem;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    visibility: visible !important;
}

.modern-input:focus, .modern-select:focus { 
    background: white; 
    border-color: var(--accent-color); 
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); 
    outline: none;
    z-index: 2;
}

.modern-select { 
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-position: right 0.875rem center; 
    background-repeat: no-repeat; 
    background-size: 1.15em;
    padding-right: 2.5rem;
}

/* ============================================
   MODE KARTY
   ============================================ */
.mode-card { 
    border: 2px solid #e5e7eb; 
    padding: 1.25rem; 
    border-radius: 1rem; 
    cursor: pointer; 
    transition: all 0.2s ease-in-out; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    padding-top: 3.5rem;
    background: white;
}
.mode-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px -5px rgba(0,0,0,0.1); 
    border-color: #c7d2fe;
}
.mode-card.active { 
    border-color: var(--accent-color); 
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); 
    background: linear-gradient(to bottom, #eff6ff, #ffffff);
}
.mode-card-dark { 
    background: linear-gradient(135deg, #1e3a8a, #1e293b); 
    color: white; 
}

/* ============================================
   FORMULÁŘOVÉ SEKCE
   ============================================ */
.form-label { 
    font-weight: 600; 
    font-size: 0.8125rem; 
    color: #374151; 
    margin-bottom: 0.4rem; 
    display: block; 
}
.form-section-heading { 
    font-size: 1.375rem; 
    font-weight: 700; 
    color: #111827; 
    padding-bottom: 0.625rem; 
    margin-bottom: 1.25rem; 
    border-bottom: 1px solid #e5e7eb; 
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

/* ============================================
   SLIDER
   ============================================ */
.slider-container {
    position: relative;
    z-index: 1;
    padding: 0.5rem 0;
}

.slider-input { 
    width: 100%; 
    -webkit-appearance: none; 
    appearance: none; 
    background: transparent; 
    cursor: pointer;
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    visibility: visible !important;
}

.slider-input::-webkit-slider-runnable-track { 
    background: #e5e7eb; 
    height: 0.5rem; 
    border-radius: 1rem; 
}

.slider-input::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    appearance: none; 
    margin-top: -5px; 
    background-color: var(--accent-color); 
    height: 1.125rem; 
    width: 1.125rem; 
    border-radius: 50%; 
    border: 2px solid white; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.15); 
}

.slider-value-input {
    font-weight: 600; 
    font-size: 0.9375rem;
    text-align: right; 
    border: 1px solid transparent; 
    background-color: transparent; 
    padding: 2px 8px; 
    border-radius: 6px; 
    transition: all 0.2s ease; 
    max-width: 110px;
    width: auto;
    position: relative;
    z-index: 2;
    opacity: 1 !important;
    visibility: visible !important;
}

.slider-value-input:focus, .slider-value-input:hover { 
    background-color: #f3f4f6; 
    border-color: #d1d5db; 
}

/* ============================================
   RESULTS GRID
   ============================================ */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   OFFER CARDS
   ============================================ */
.offer-card { 
    background-color: white; 
    border: 2px solid #e5e7eb; 
    transition: all 0.25s ease; 
    cursor: pointer; 
    display: flex; 
    flex-direction: column; 
    border-radius: 1rem; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    padding: 1.125rem;
}

.offer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #818cf8);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.offer-card:hover::before,
.offer-card.selected::before {
    transform: scaleX(1);
}

.offer-card:hover { 
    border-color: #93c5fd; 
    transform: translateY(-3px); 
    box-shadow: 0 12px 20px -5px rgba(0,0,0,0.12);
}

.offer-card.selected { 
    border-color: var(--accent-color); 
    background: linear-gradient(to bottom right, #eff6ff, #fefefe);
}

/* ============================================
   CHAT BUBBLES
   ============================================ */
.chat-bubble-ai { 
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
    color: #1f2937; 
    border-radius: 1.125rem 1.125rem 1.125rem 0.25rem; 
    padding: 14px 18px; 
    max-width: 85%; 
    width: fit-content; 
    line-height: 1.6;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.08);
    animation: slideInLeft 0.25s ease-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.9375rem;
    margin-bottom: 12px;
}

.chat-bubble-user { 
    background: linear-gradient(135deg, var(--accent-color), #4f46e5);
    color: white; 
    border-radius: 1.125rem 1.125rem 0.25rem 1.125rem; 
    padding: 14px 18px; 
    max-width: 85%; 
    width: fit-content; 
    align-self: flex-end; 
    line-height: 1.6;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.08);
    animation: slideInRight 0.25s ease-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.9375rem;
    margin-bottom: 12px;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-15px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(15px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   LOADING SPINNERS
   ============================================ */
.loading-spinner-blue { 
    margin: 1rem auto; 
    display: inline-block; 
    width: 22px; 
    height: 22px; 
    border: 2.5px solid rgba(59, 130, 246, 0.2); 
    border-top-color: var(--accent-color); 
    border-radius: 50%; 
    animation: spin 0.8s linear infinite; 
}
.loading-spinner-white { 
    display: inline-block; 
    width: 18px; 
    height: 18px; 
    border: 2.5px solid rgba(255, 255, 255, 0.3); 
    border-top-color: #fff; 
    border-radius: 50%; 
    animation: spin 0.8s linear infinite; 
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   SUGGESTION BUTTONS
   ============================================ */
.suggestion-btn { 
    background: linear-gradient(to bottom, white, #fafafa);
    border: 1px solid #d1d5db; 
    color: #374151; 
    padding: 8px 14px; 
    border-radius: 9999px; 
    font-size: 0.8125rem; 
    cursor: pointer; 
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.suggestion-btn:hover { 
    background: linear-gradient(to bottom, #fafafa, #f3f4f6);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px -1px rgba(0,0,0,0.1);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden { display: none; }

/* ============================================
   MOBILE OPTIMIZATIONS (max-width: 1023px)
   ============================================ */
@media (max-width: 1023px) {
    /* PLNÁ VÝŠKA CHATU NA MOBILU */
    #ai-chat-wrapper {
        height: calc(100vh - 180px) !important;
        max-height: calc(100vh - 180px) !important;
        overflow: hidden !important;
    }
    
    #chat-messages {
        height: 100% !important;
        max-height: 100% !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 12px !important;
    }
    
    .chat-bubble-ai,
    .chat-bubble-user {
        max-width: 90%;
        font-size: 0.875rem;
        padding: 12px 14px;
    }
    
    .modern-input, .modern-select {
        font-size: 16px !important;
    }
}

/* ============================================
   TABLET (768px - 1023px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --sidebar-width: 320px;
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.125rem 1.375rem;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.125rem;
    }
}

/* ============================================
   DESKTOP (min-width: 1024px)
   ============================================ */
@media (min-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.375rem 1.75rem;
    }
    
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.375rem;
    }
    
    /* MAXIMÁLNÍ PROSTOR PRO CHAT */
    #chat-messages {
        height: calc(100vh - 250px) !important;
        min-height: calc(100vh - 250px) !important;
    }
    
    #ai-chat-wrapper {
        min-height: calc(100vh - 200px) !important;
    }
    
    .chat-bubble-ai,
    .chat-bubble-user {
        max-width: 75%;
    }
}

/* ============================================
   LARGE DESKTOP (min-width: 1440px)
   ============================================ */
@media (min-width: 1440px) {
    :root {
        --sidebar-width: 400px;
    }
    
    .chat-bubble-ai,
    .chat-bubble-user {
        max-width: 70%;
    }
}

/* ============================================
   ZOOM FIX
   ============================================ */
@media screen and (max-device-width: 1024px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
        position: relative !important;
        z-index: 999 !important;
    }
}

@supports (-webkit-touch-callout: none) {
    #permanent-chat-input {
        font-size: 16px !important;
        transform: scale(1) !important;
        -webkit-transform: scale(1) !important;
    }
}

@supports (padding: max(0px)) {
    header {
        padding-top: max(0px, env(safe-area-inset-top));
    }
    
    #sidebar-container {
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    }
    
    #chat-input-footer {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
}

*:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

@media (hover: none) and (pointer: coarse) {
    .nav-btn:hover,
    .offer-card:hover,
    .suggestion-btn:hover,
    .mode-card:hover {
        transform: none;
    }
}

@media print {
    .nav-btn, 
    #mobile-menu-button, 
    #cookie-banner,
    #sidebar-container,
    .sidebar-toggle {
        display: none !important;
    }
}

input:not([type="hidden"]),
select,
textarea {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    user-select: text !important;
    -webkit-user-select: text !important;
}

/* === NOVÉ STYLY PRO INTERAKTIVNÍ NÁPOVĚDU === */
.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #d1d5db;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}
.info-icon:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

.info-tooltip {
    position: absolute;
    background: #1f2937;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    width: 280px;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateY(10px);
}

.info-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.info-tooltip .ask-ai-btn {
    display: block;
    margin-top: 10px;
    padding: 6px 10px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: center;
}
/* ============================================
   STYLY PRO PARTNERY
   ============================================ */
#partneri .flex-wrap span {
    color: #6b7280; /* Neutrální šedá barva textu */
    transition: all 0.2s ease-in-out;
    filter: grayscale(50%); /* Lehce odbarvený text pro decentní vzhled */
    opacity: 0.8;
}

#partneri .flex-wrap span:hover {
    color: #111827; /* Při najetí myší text ztmavne */
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* ============================================
   FINÁLNÍ OPRAVA LAYOUTU KONTAKTNÍHO FORMULÁŘE
   ============================================ */

/* Cílíme přímo na kontejner s poli "Jméno" a "Telefon" uvnitř formuláře s ID "lead-form" */
#lead-form > div:first-of-type {
    display: grid;
    gap: 1rem; /* Mezera mezi poli */
}

/* Na zařízeních širších než 768px (tablety a desktopy) 
   se tento kontejner rozdělí do dvou sloupců. */
@media (min-width: 768px) {
    #lead-form > div:first-of-type {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   OPRAVA ZOBRAZENÍ POSUVNÍKŮ PRO FIREFOX
   ============================================ */
.slider-input::-moz-range-track {
    background: #e5e7eb;
    height: 0.5rem;
    border-radius: 1rem;
}

.slider-input::-moz-range-thumb {
    background-color: var(--accent-color);
    height: 1.125rem;
    width: 1.125rem;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    cursor: pointer;
}

/* ============================================
   FINÁLNÍ OPRAVA LAYOUTU KONTAKTNÍHO FORMULÁŘE
   ============================================ */

/* Toto pravidlo zajistí, že se grid uvnitř formuláře bude chovat správně */
#lead-form .grid {
    display: grid;
    gap: 1rem;
}

/* Na zařízeních širších než 768px se grid rozdělí do dvou sloupců */
@media (min-width: 768px) {
    #lead-form .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Toto zajistí, že se pole pro e-mail a další roztáhnou přes oba sloupce */
    #lead-form .md\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* ============================================
   STYLY PRO COOKIE LIŠTU
   ============================================ */
#cookie-details {
    max-height: 0; /* Ve výchozím stavu skryto */
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding-top: 0 !important;  /* Vynutíme nulový padding */
    padding-bottom: 0 !important; /* Vynutíme nulový padding */
    box-sizing: border-box; /* Zajistí správný výpočet výšky */
}

#cookie-details.expanded {
    max-height: 500px; /* Dostatečně velká hodnota pro rozbalení */
    padding-top: 1rem !important; /* Obnovíme padding */
    padding-bottom: 1rem !important; /* Obnovíme padding */
}

/* Skryjeme původní #cookie-banner, pokud existuje */
#cookie-banner { display: none !important; }

/* Zajistíme, že wrapper je skrytý, pokud není potřeba */
#cookie-banner-wrapper.hidden {
    display: none;
}

/* ============================================
   POJISTKA PRO KLIKNUTÍ NA INFO IKONY
   ============================================ */
.info-icon {
    position: relative; /* Zajistí správné vrstvení */
    z-index: 5;         /* Dáme ikonu mírně "nad" okolní text */
    pointer-events: auto !important; /* Vynutí, aby byla ikona klikatelná */
    cursor: pointer;    /* Ukáže uživateli, že je klikatelná */
}

/* style.css */

/* Styly pro sekci Mýty a Fakta */
.myth-card {
    perspective: 1000px; /* Nutné pro 3D efekt */
    min-height: 180px; /* Zajistí minimální výšku, i když je text krátký */
    position: relative;
}

.myth-front,
.myth-back {
    /* Backface-visibility skryje zadní stranu, když je otočená */
    backface-visibility: hidden;
    transition: transform 0.6s, opacity 0.3s;
    width: 100%;
    height: 100%;
    position: absolute; /* Důležité pro překrytí */
    top: 0;
    left: 0;
}

/* Výchozí stav - přední strana viditelná */
.myth-front {
    z-index: 2;
    transform: rotateY(0deg);
}

/* Výchozí stav - zadní strana skrytá a otočená */
.myth-back {
    transform: rotateY(180deg);
    z-index: 1; /* Pod přední stranou */
    /* Zajištění, že se zobrazí, když má třídu flipped */
    display: block !important; /* Přepíše Tailwind hidden */
    opacity: 0;
}

/* Stav po kliknutí (když má karta třídu .flipped) */
.myth-card.flipped .myth-front {
    transform: rotateY(-180deg);
    opacity: 0;
    z-index: 1;
}

.myth-card.flipped .myth-back {
    transform: rotateY(0deg);
    opacity: 1;
    z-index: 2;
}

/* Úprava Tailwind tříd, aby fungovaly s absolutní pozicí */
.group\[\.flipped\]\:opacity-0,
.group\[\.flipped\]\:hidden {
    /* Tyto už nepotřebujeme řídit přes Tailwind, řídí je CSS transform a opacity */
}
.group\[\.flipped\]\:opacity-100,
.group\[\.flipped\]\:block {
   /* Tyto už nepotřebujeme řídit přes Tailwind, řídí je CSS transform a opacity */
}


/* Zajistíme, že skrytá strana nezabírá místo, dokud se neotočí */
.myth-card:not(.flipped) .myth-back {
    position: absolute;
}
.myth-card.flipped .myth-front {
    position: absolute;
}