/* Soubor: style.css | Verze: 1.6 */

:root {
    --brand-color: #2563eb;
    --brand-color-rgb: 37, 99, 235; /* Pro možnost průhlednosti (tinting) */
    --brand-contrast-text: #ffffff; /* Bude dynamicky měněno JS podle tmavosti brand barvy */
    --brand-blur: 8px; /* Úroveň rozmazání pozadí */
}

/* --- ZÁKLADNÍ UTILITY --- */
.hidden-view {
    display: none !important;
}

.break-words-safe {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- BRANDING TŘÍDY (Nyní chytřejší s kontrastem a tónováním) --- */
.brand-bg {
    background-color: var(--brand-color) !important;
    color: var(--brand-contrast-text) !important; /* Dynamický kontrast */
}

/* Jemné podbarvení pro pozadí karet, ankety apod. (10% krytí) */
.brand-bg-tint {
    background-color: rgba(var(--brand-color-rgb), 0.1) !important;
}

/* Silnější podbarvení (20% krytí) */
.brand-bg-tint-strong {
    background-color: rgba(var(--brand-color-rgb), 0.2) !important;
}

.brand-text {
    color: var(--brand-color) !important;
}

.brand-border {
    border-color: var(--brand-color) !important;
}

.brand-ring:focus {
    --tw-ring-color: var(--brand-color) !important;
}

/* Dynamické rozmazání pro overlay vrstvu při vlastním pozadí */
.dynamic-blur {
    backdrop-filter: blur(var(--brand-blur));
    -webkit-backdrop-filter: blur(var(--brand-blur));
}

/* --- ANIMACE A EFEKTY --- */
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.animate-pop {
    animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.question-new {
    animation: slideUpFade 0.5s ease-out forwards;
}

@keyframes flashNew {
    0% { transform: scale(0.95); opacity: 0; }
    20% { transform: scale(1.02); opacity: 1; }
    40% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 20px rgba(250, 204, 21, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}

.card-transition {
    transition: all 0.3s ease;
}

/* --- ZVÝRAZNĚNÍ DOTAZU --- */
.question-highlight {
    position: relative;
    z-index: 10;
}

/* --- BOTTOM SHEET (Položit dotaz) --- */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 50;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.dark .bottom-sheet {
    background: #1e1e1e; /* darkcard */
}

.bottom-sheet.active {
    transform: translateY(0);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
}

.bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 40;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- PWA NOVÉ DOTAZY BADGE --- */
.new-questions-badge {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--brand-color);
    color: var(--brand-contrast-text);
    padding: 8px 20px;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 35;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.new-questions-badge:not(.hidden-badge) {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.new-questions-badge i {
    animation: bounceUp 2s infinite;
}

@keyframes bounceUp {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
    60% { transform: translateY(-2px); }
}

/* --- PREZENTÉR VIEW SCROLL --- */
.presenter-scroll-smooth {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Vlastní pozadí celého body a zajištění plné výšky */
body.has-custom-bg {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* View Transitions API (Prohlížeče, co to umí, udělají krásné animace přeřazení) */
::view-transition-group(*) {
    animation-duration: 0.5s;
    animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
