html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    overflow: hidden;
}

#app {
    height: 100%;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Blazor WASM initial loading screen */
.blazor-loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #FAFFF9;
    gap: 8px;
}

.blazor-loading-icon {
    font-size: 3.5rem;
    color: #2E7D32;
}

.blazor-loading-logo {
    height: 64px;
    width: 64px;
    object-fit: contain;
}

.blazor-loading-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #2E7D32;
}

.blazor-loading-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    font-style: italic;
    color: #558B2F;
}

.blazor-loading-dots {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.blazor-loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2E7D32;
    animation: blazor-dot-pulse 1.2s ease-in-out infinite;
}

.blazor-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.blazor-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blazor-dot-pulse {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.2); }
}

code {
    color: #c02d76;
}

/* ─── Auth pages (login, logout, error) ─── */
.auth-page {
    height: 100vh;
    background: #FAFFF9;
}

.auth-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #FAFFF9;
    gap: 8px;
}

.auth-screen-icon {
    font-size: 3.5rem;
    color: #2E7D32;
}

.auth-screen-icon--error {
    color: #C62828;
}

.auth-screen-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #2E7D32;
}

.auth-screen-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    font-style: italic;
    color: #558B2F;
}

.auth-screen-message {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: #666;
    max-width: 400px;
    text-align: center;
    margin-top: 4px;
}

.auth-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 10px 24px;
    background: #2E7D32;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.auth-home-btn:hover {
    background: #1B5E20;
}

/* ─── App layout: no page scroll ─── */

/* mud-layout height handled via flex below */

/* Layout wrapper: sidebar + main content side-by-side, below AppBar */
.app-layout-with-sidebar {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.mud-layout {
    display: flex;
    flex-direction: column;
}

.app-main-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    padding-top: 0 !important;
}

.app-body-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0; /* allow flex child to shrink */
}

/* Admin zóna má vlastný MudLayout; html/body je overflow:hidden (kvôli celoobrazovkovému chatu),
   takže hlavný obsah admina sa nevie skrolovať ako okno. Dáme mu vlastný vertikálny scroll, inak
   je dlhší obsah (tabuľky monitoringu/logov) odseknutý dole. (#2524) */
.admin-main-content {
    height: 100vh;
    overflow-y: auto;
}

/* Súhrnné štatistiky monitoringu — karty v jednom riadku vedľa seba (wrap až na úzkych obrazovkách). */
.monitoring-stat-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.monitoring-stat-cards > * {
    flex: 1 1 0;
    min-width: 150px;
}

/* ─── AgroAssistant custom styles ─── */

/* Welcome / loading screen – centered, no scroll */
.chat-welcome-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.chat-welcome-box {
    width: 100%;
    max-width: 640px;
    text-align: center;
    padding: 0 16px;
}

.topic-suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 4px;
}

/* Oficiálne logá projektu — len na úvodnej obrazovke, pod tlačidlami */
.welcome-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 18px 30px;
    margin-top: 20px;
}

.welcome-logo {
    height: 54px;
    width: auto;
    display: block;
}

.welcome-logo-link {
    display: inline-flex;
    line-height: 0;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.welcome-logo-link:hover {
    opacity: 0.8;
}

/* Status text animation */
.status-text {
    color: #558B2F;
    font-size: 0.95rem;
    font-style: italic;
    margin: 0;
}

.status-text::after {
    content: '';
    display: inline-block;
    animation: status-dots 1.6s steps(3, end) infinite;
}

@keyframes status-dots {
    0%   { content: ''; }
    33%  { content: '.'; }
    66%  { content: '..'; }
    100% { content: '...'; }
}

/* Chat status bubble (used during assistant typing) */
.chat-status-bubble {
    background-color: #F1F8E9 !important;
    border-left: 3px solid #2E7D32;
}

/* Drag-drop zone */
.chat-drop-zone {
    position: relative;
    border-radius: 4px;
    transition: outline 0.12s, background 0.12s;
}

.chat-drop-zone.drop-active {
    outline: 2px dashed #2E7D32;
    outline-offset: 3px;
    background: rgba(46, 125, 50, 0.04);
}

.chat-drop-zone.drop-active::after {
    content: 'Pustite súbory sem';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #2E7D32;
    font-weight: 500;
    pointer-events: none;
    background: rgba(241, 248, 233, 0.85);
    border-radius: 4px;
    z-index: 10;
}

/* SPU footer */
.spu-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 56px;
    padding: 0 24px;
    border-top: 1px solid #C8E6C9;
    background: #F9FDF9;
    flex-shrink: 0;
    z-index: 100;
}

/* AgroAsistent brand logo (nahradzuje povodnu Grass ikonu) */
.agro-logo-icon {
    height: 28px;
    width: 28px;
    object-fit: contain;
    display: block;
}

.agro-logo-clickable {
    cursor: pointer;
    border-radius: 6px;
    transition: opacity 0.15s ease;
}

.agro-logo-clickable:hover {
    opacity: 0.75;
}

.agro-logo-hero {
    height: 64px;
    width: 64px;
    object-fit: contain;
}

.spu-footer-text {
    font-size: 0.78rem;
    color: #4A6741;
}

.spu-footer-disclaimer {
    font-size: 0.72rem;
    color: #7A8F71;
}

.spu-footer-links {
    font-size: 0.78rem;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.spu-footer-links a {
    color: #2E7D32;
    text-decoration: none;
}

.spu-footer-links a:hover {
    text-decoration: underline;
}

/* Pri šírke < 1600px naskladaj texty pätičky pod seba (nie vedľa seba). */
@media (max-width: 1599.98px) {
    .spu-footer {
        flex-direction: column;
        height: auto;
        min-height: 56px;
        gap: 2px;
        padding-top: 6px;
        padding-bottom: 6px;
    }
}

/* Cookie info banner (nie consent-gate — len informácia o nevyhnutných cookies). */
.cookie-notice {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 11000;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px 20px;
    background: #FFFFFF;
    border: 1px solid #C8E6C9;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
}

.cookie-notice-text {
    font-size: 0.82rem;
    color: #1B2E1C;
    max-width: 760px;
}

.cookie-notice-text a {
    color: #2E7D32;
}

/* Skrolovateľný kontajner pre statické stránky (Zásady/Podmienky/Profil) — rodič `app-body-container`
   je flex column s overflow:hidden (kvôli chatu), preto si stránka rieši vlastný interný scroll. */
.static-page-scroll {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
}

/* Telo právnych dokumentov (HTML render). */
.legal-content {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #1B2E1C;
}

.legal-content h2 {
    font-size: 1.15rem;
    margin: 1.4em 0 0.5em;
    color: #1B5E20;
}

.legal-content ul {
    padding-left: 1.4em;
}

.legal-content a {
    color: #2E7D32;
}

.topic-card {
    transition: transform 0.15s, box-shadow 0.15s;
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.topic-card.selected {
    border: 2px solid var(--mud-palette-primary);
}

/* Message wrapper: bubble + action buttons above */
.chat-msg-wrapper {
    display: flex;
    flex-direction: column;   
    margin-bottom: 12px;
}

.chat-msg-wrapper.user {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-msg-wrapper.assistant {
    align-self: flex-start;
    align-items: flex-start;
}

/* Action buttons row above the bubble — trvalo viditeľné (na touch zariadeniach hover
   neexistuje a aj na desktope boli akcie kopírovať/PDF ťažko objaviteľné). */
.chat-msg-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    margin-bottom: 4px;
    padding-right: 6px;
}

.msg-action-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    padding: 0 !important;
    color: #666 !important;
    background-color: rgba(255, 255, 255, 0.92) !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.msg-action-btn .mud-icon-root {
    font-size: 15px !important;
}

.msg-action-btn:hover {
    background-color: #fff !important;
    color: #333 !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.chat-bubble {
    border-radius: 12px;
}

.chat-bubble.user {
    background-color: var(--mud-palette-primary-lighten);
    border-bottom-right-radius: 2px;
    /* Zachovaj viacnásobné medzery aj zalomenia v používateľskej správe
       (napr. nazov_subjektu z mapy s dvojitou medzerou ako "Agricola  spol. s r.o."). */
    white-space: pre-wrap;
}

.chat-bubble.assistant {
    background-color: var(--mud-palette-surface);
    border-bottom-left-radius: 2px;
}

/* Chat phase: flex column, only messages scroll */
.chat-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 8px;
}

.chat-toolbar {
    flex-shrink: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.chat-input-wrapper {
    flex-shrink: 0;
}

/* Assistant HTML content styling */
.assistant-html-content {
    font-size: 0.875rem;
    line-height: 1.6;
    word-break: break-word;
}

.assistant-html-content h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #2E7D32;
}

.assistant-html-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 12px 0 6px;
    color: #33691E;
}

.assistant-html-content p {
    margin: 6px 0;
}

.assistant-html-content ul, .assistant-html-content ol {
    margin: 6px 0;
    padding-left: 20px;
}

.assistant-html-content li {
    margin: 3px 0;
}

.assistant-html-content hr {
    border: none;
    border-top: 1px solid #C8E6C9;
    margin: 12px 0;
}

.assistant-html-content strong {
    font-weight: 600;
}

.assistant-html-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 0.8rem;
}

.assistant-html-content th, .assistant-html-content td {
    border: 1px solid #C8E6C9;
    padding: 6px 8px;
    text-align: left;
}

.assistant-html-content th {
    background-color: #E8F5E9;
    font-weight: 600;
}

/* Suggestion chips inside assistant message bubble */
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ─── Map modal ─── */

/* Backdrop – semi-transparent, centres the card */
.map-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(0, 0, 0, 0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Floating card */
.map-modal-card {
    width: 100%;
    max-width: 940px;
    height: 80vh;
    max-height: 720px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header row */
.map-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 14px;
    background: #E8F5E9;
    border-bottom: 1px solid #C8E6C9;
}

.map-modal-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #2E7D32;
}

.map-modal-header-spacer { flex: 1; }

/* Toolbar: layer radio + search */
.map-modal-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 14px;
    background: #FAFFF9;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.map-layer-selector {
    display: flex;
    align-items: center;
}

/* Coloured dot before radio label */
.map-radio-label {
    font-size: 0.80rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.map-radio-label::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 9px;
    border-radius: 2px;
    border: 1.5px solid;
}

.map-radio-lpis::before { background: rgba(255,215,0,0.35); border-color: #B8860B; }
.map-radio-bnd::before  { background: rgba(66,165,245,0.35); border-color: #1565C0; }

/* Search field */
.map-search-area {
    flex: 1;
    min-width: 180px;
    max-width: 320px;
}

.map-search-field { width: 100%; }

/* Status / hint bar */
.map-status-bar {
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 3px 14px;
    text-align: center;
}

.map-status-hint {
    background: #FFF9C4;
    color: #795548;
    border-bottom: 1px solid #F9E57A;
}

/* Map area – wraps the Leaflet container + preloader overlay */
.map-area {
    flex: 1;
    min-height: 0;
    position: relative;
}

#map-container {
    width: 100%;
    height: 100%;
}

/* Circular preloader – bottom-left corner of the map */
.map-preloader {
    position: absolute;
    bottom: 24px;
    left: 12px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.92);
    padding: 6px 14px 6px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    font-size: 0.80rem;
    font-weight: 500;
    color: #333;
    pointer-events: none;
}


/* Zoom level display between zoom-in and zoom-out buttons */
.map-zoom-level {
    display: block;
    width: 30px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #333;
    background: #fff;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    cursor: default;
    user-select: none;
}

/* Leaflet popup custom styles */
.map-popup {
    font-size: 0.82rem;
    min-width: 200px;
}

.map-popup-title {
    font-weight: 700;
    color: #2E7D32;
    margin-bottom: 6px;
    font-size: 0.87rem;
}

.map-popup-table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 8px;
}

.map-popup-table td {
    padding: 2px 6px;
    vertical-align: top;
    /* Zachovaj viacnásobné medzery v hodnotách (napr. dvojitá medzera v nazov_subjektu).
       Selektor td:first-child nižšie má vyššiu špecificitu a label stĺpcu ponecháva nowrap. */
    white-space: pre-wrap;
}

.map-popup-table td:first-child {
    color: #666;
    white-space: nowrap;
    padding-right: 8px;
}

.map-popup-select-btn {
    display: block;
    width: 100%;
    padding: 5px 0;
    background: #2E7D32;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s;
}

.map-popup-select-btn:hover {
    background: #1B5E20;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ─── Chat Sidebar ─── */

.chat-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #F5F5F5;
    border-right: 1px solid #E0E0E0;
    transition: width 0.2s ease;
    flex-shrink: 0;
    overflow: hidden;
    z-index: 200;
}

.chat-sidebar.expanded {
    width: 300px;
    min-width: 200px;
    max-width: 500px;
    resize: horizontal;
}

.chat-sidebar.collapsed {
    width: 56px;
}

.chat-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px 4px 10px;
    flex-shrink: 0;
}

.chat-sidebar.collapsed .chat-sidebar-header {
    justify-content: center;
    padding: 8px 4px;
}

.chat-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-sidebar-action {
    padding: 2px 8px;
    flex-shrink: 0;
}

.chat-sidebar-action.collapsed-action {
    padding: 4px 0;
    display: flex;
    justify-content: center;
}

.chat-sidebar-hr {
    border: none;
    border-top: 1px solid #E0E0E0;
    margin: 4px 8px;
}

.chat-sidebar-btn {
    justify-content: flex-start;
    text-transform: none !important;
    font-weight: 500;
}

.chat-sidebar.collapsed .chat-sidebar-btn {
    justify-content: center;
    min-width: 0 !important;
    padding: 8px !important;
}

.chat-sidebar-btn-plain {
    color: #333333 !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px 12px !important;
}

.chat-sidebar-btn-plain:hover {
    background-color: rgba(0,0,0,0.06) !important;
}

.chat-sidebar-icon-btn {
    color: #555555 !important;
}

.chat-sidebar-divider {
    display: flex;
    align-items: center;
    padding: 10px 10px 4px;
    border-bottom: 1px solid #E0E0E0;
    margin: 0 0 4px;
    flex-shrink: 0;
}

.chat-sidebar-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
}

.chat-sidebar-loader {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.chat-sidebar-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    cursor: pointer;
    transition: background-color 0.12s;
    gap: 6px;
    min-height: 36px;
    margin: 2px 6px;
    border-radius: 6px;
}

.chat-sidebar-item:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

.chat-sidebar-item.selected {
    background-color: rgba(46, 125, 50, 0.12);
    border-left: 3px solid #2E7D32;
    padding-left: 5px;
}

.chat-sidebar-item-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chat-sidebar-item-name {
    font-size: 0.82rem;
    font-weight: 400;
    color: #1B2E1C;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
    min-width: 0;
}

/* Dátum a čas vytvorenia konverzácie (#2510) — decentný sivý riadok pod názvom, kompaktný. */
.chat-sidebar-item-date {
    font-size: 0.66rem;
    color: #9aa0a6;
    line-height: 1.2;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-sidebar-item-menu {
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.chat-sidebar-item:hover .chat-sidebar-item-menu {
    opacity: 1;
}

.chat-sidebar-rename-field {
    flex: 1;
}

@media (max-width: 767px) {
    .chat-sidebar.expanded {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 500;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
    }
}
/* Developer mode model selector in sidebar */
.chat-sidebar-dev-section {
    padding: 8px 8px 4px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-bottom: 1px solid rgba(var(--mud-palette-text-primary-rgb, 0,0,0), 0.1);
}

.chat-sidebar-select {
    width: 100%;
}

.chat-sidebar-user-panel {
    margin-top: auto;
    padding: 8px 12px;
    border-top: 1px solid #C8E6C9;
}

.chat-sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
}

.chat-sidebar-username {
    font-weight: 500;
    color: #1B2E1C;
}

/* Custom user menu (collapsed sidebar — bypass MudMenu pre spoľahlivý klik na avatar) */
.custom-user-menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 16px;
    background: none;
    color: #1B2E1C;
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 120ms ease;
}

.custom-user-menu-item:hover {
    background-color: rgba(46, 125, 50, 0.08);
}

.custom-user-menu-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.12);
    margin: 4px 0;
}

/* Data source attribution — discreet, small, placed at the END of a data section. */
.src-source {
    display: block;
    font-size: 0.7rem;
    font-style: italic;
    color: #8a8a8a;
    text-align: right;
    margin-top: 4px;
    margin-bottom: 10px;
    opacity: 0.85;
    line-height: 1.3;
}

.src-source::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    transform: translateY(-1px);
}

.src-source.src-spu::before  { background-color: #43A047; }
.src-source.src-sk::before   { background-color: #1E88E5; }
.src-source.src-gsaa::before { background-color: #FB8C00; }

/* Legacy badge styles — kept for backwards compatibility with older messages. */
.src-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-style: italic;
    color: #8a8a8a;
    margin-left: 8px;
    vertical-align: middle;
    opacity: 0.85;
}

/* Voice input (F-UI-08) — pulsing mic while recording */
.voice-recording {
    animation: voice-pulse 1.2s ease-in-out infinite;
}

/* Transcription spinner — fixed box matching the icon-button footprint so it stays centred
   (no off-centre rotation / layout shift while it replaces the mic button). */
.voice-progress {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
}

.voice-progress-lg {
    width: 48px;
    height: 48px;
}

@keyframes voice-pulse {
    0%   { transform: scale(1);    opacity: 1; }
    50%  { transform: scale(1.15); opacity: 0.65; }
    100% { transform: scale(1);    opacity: 1; }
}
