/* ==========================================================================
   AI Stavební poradna - CSS Stylopis
   Stavařský web (stavarskyweb.cz)
   Vizuální styl: Dark / Gold (#ffe600), fonty Oswald + Source Sans 3
   ========================================================================== */

body {
    background-color: #191919;
}

.ai-advisor-main {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 10px 15px 15px 75px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-container {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 1840px;
    margin: 0 auto;
    height: 100%;
    min-height: 0;
    background: #191919;
    border-radius: 8px;
    border: 1px solid #333333;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   LEVE MENU / SIDEBAR
   ========================================================================== */
.ai-sidebar {
    width: 340px;
    min-width: 300px;
    background: #1e1e1e;
    border-right: 1px solid #333333;
    display: flex;
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
}

.ai-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #2e2e2e;
    margin-bottom: 14px;
}

.ai-sidebar-header h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.25rem;
    color: #ffe600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-badge-tier {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-badge-premium {
    background: #ffe600;
    color: #111111;
}

.ai-badge-free {
    background: #444444;
    color: #cccccc;
}

/* Kvóta box */
.ai-quota-box {
    background: #252525;
    border: 1px solid #383838;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.ai-quota-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    font-size: 0.8rem;
    color: #cccccc;
}

.ai-quota-stat-item {
    display: flex;
    flex-direction: column;
}

.ai-quota-renewal-note {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed #3a3a3a;
    font-size: 0.76rem;
    color: #b0b0b0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-quota-renewal-note i {
    color: #ffe600;
}

.ai-quota-renewal-note strong {
    color: #ffe600;
}

.ai-quota-val strong {
    color: #ffe600;
}

.ai-quota-demo-notice {
    font-size: 0.8rem;
    color: #e0e0e0;
    line-height: 1.35;
}

.ai-quota-demo-notice strong {
    color: #ffe600;
    display: block;
    margin-bottom: 3px;
}

.ai-quota-demo-notice a {
    color: #ffe600;
    text-decoration: underline;
}

/* Přepínač hloubky přemýšlení */
.ai-thinking-toggle-container {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #333333;
}

.ai-thinking-toggle-container label {
    display: block;
    font-size: 0.75rem;
    color: #aaaaaa;
    margin-bottom: 4px;
}

.ai-select-thinking {
    width: 100%;
    background: #181818;
    color: #ffffff;
    border: 1px solid #444444;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    outline: none;
    cursor: pointer;
}

.ai-select-thinking:focus {
    border-color: #ffe600;
}

/* Tlačítko nové konverzace */
.ai-btn-new-thread {
    background: #ffe600;
    color: #111111;
    border: none;
    padding: 10px 14px;
    border-radius: 5px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    transition: background 0.18s ease, transform 0.12s ease;
}

.ai-btn-new-thread:hover:not(:disabled) {
    background: #fff04d;
    transform: translateY(-1px);
}

.ai-btn-new-thread:disabled {
    background: #444444;
    color: #888888;
    cursor: not-allowed;
}

/* Sekce oborových skills */
.ai-sidebar-section-title {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ai-skills-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.ai-skill-item {
    background: #252525;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
}

.ai-skill-item:hover {
    background: #2c2c2c;
    border-color: #555555;
}

.ai-skill-item.active {
    background: #2a2817;
    border-color: #ffe600;
    box-shadow: inset 3px 0 0 #ffe600;
}

.ai-skill-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: #181818;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffe600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.ai-skill-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-skill-title {
    font-size: 0.83rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-skill-norm {
    font-size: 0.7rem;
    color: #aaaaaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Historie vláken */
.ai-history-section {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #2e2e2e;
    flex-grow: 1;
}

.ai-history-header-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.ai-history-filter-select {
    width: 100%;
    background: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #333333;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.78rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.ai-history-filter-select:focus,
.ai-history-filter-select:hover {
    border-color: #ffe600;
    background: #242424;
}

.ai-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-history-item {
    padding: 7px 10px;
    border-radius: 4px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #cccccc;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ai-history-item:hover {
    background: #252525;
    color: #ffffff;
}

.ai-history-item.active {
    background: #282828;
    color: #ffe600;
    font-weight: 600;
}

.ai-history-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-right: 6px;
}

.ai-history-delete-btn {
    background: transparent;
    border: none;
    color: #777777;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    visibility: hidden;
}

.ai-history-item:hover .ai-history-delete-btn {
    visibility: visible;
}

.ai-history-delete-btn:hover {
    color: #ff5555;
}

/* ==========================================================================
   PRAVÝ HLAVNÍ PANEL: CHAT
   ========================================================================== */
.ai-chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #181818;
    min-width: 0;
    position: relative;
}

/* Hlavička chatu */
.ai-chat-header {
    padding: 14px 20px;
    background: #202020;
    border-bottom: 1px solid #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-header-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-active-expert-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #2a2817;
    border: 1px solid #ffe600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffe600;
    font-size: 1.1rem;
}

.ai-chat-header-main h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.5px;
}

.ai-header-norm {
    font-size: 0.76rem;
    color: #ffe600;
}

.ai-btn-copy-last {
    background: #2a2a2a;
    color: #cccccc;
    border: 1px solid #444444;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.ai-btn-copy-last:hover {
    background: #333333;
    color: #ffe600;
    border-color: #ffe600;
}

/* Rychlé dotazy / tags */
.ai-quick-queries-container {
    padding: 8px 20px;
    background: #1c1c1c;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    font-size: 0.78rem;
}

.ai-quick-title {
    color: #888888;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-quick-tags {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.ai-quick-tag {
    background: #252525;
    color: #dddddd;
    border: 1px solid #3a3a3a;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.ai-quick-tag:hover {
    background: #333333;
    border-color: #ffe600;
    color: #ffe600;
}

/* Oblast zpráv */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scroll-behavior: smooth;
}

/* Uvítací prázdný stav */
.ai-chat-welcome {
    margin: auto;
    text-align: center;
    max-width: 460px;
    padding: 30px 20px;
    color: #aaaaaa;
}

.ai-welcome-icon {
    font-size: 2.8rem;
    color: #ffe600;
    margin-bottom: 14px;
}

.ai-chat-welcome h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.ai-chat-welcome p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #aaaaaa;
}

/* Zprávy (bubliny) */
.ai-msg {
    display: flex;
    gap: 12px;
    max-width: 90%;
    animation: fadeInMsg 0.25s ease-out;
}

@keyframes fadeInMsg {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-msg-model {
    align-self: flex-start;
}

.ai-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2e2e2e;
    color: #cccccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.ai-msg-user .ai-msg-avatar {
    background: #333333;
    color: #ffffff;
}

.ai-msg-model .ai-msg-avatar {
    background: #2a2817;
    color: #ffe600;
    border: 1px solid #ffe600;
}

.ai-msg-bubble {
    background: #232323;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 12px 16px;
    color: #e5e5e5;
    font-size: 0.9rem;
    line-height: 1.55;
    word-break: break-word;
}

.ai-msg-user .ai-msg-bubble {
    background: #2c2a1c;
    border-color: #665b10;
    color: #ffffff;
}

.ai-msg-author {
    font-size: 0.72rem;
    font-weight: 700;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ai-msg-user .ai-msg-author {
    color: #ffe600;
    text-align: right;
}

.ai-msg-body p {
    margin: 0 0 10px 0;
}

.ai-msg-body p:last-child {
    margin-bottom: 0;
}

.ai-msg-body h1, .ai-msg-body h2, .ai-msg-body h3, .ai-msg-body h4 {
    font-family: 'Oswald', sans-serif;
    color: #ffe600;
    margin: 14px 0 8px 0;
    letter-spacing: 0.3px;
}

.ai-msg-body h3 {
    font-size: 1.05rem;
    border-bottom: 1px solid #333333;
    padding-bottom: 4px;
}

.ai-msg-body hr {
    border: 0;
    border-top: 1px solid #333333;
    margin: 14px 0;
}

.ai-msg-body ul, .ai-msg-body ol {
    margin: 6px 0 10px 20px;
    padding: 0;
}

.ai-msg-body li {
    margin-bottom: 4px;
}

.ai-msg-body sub,
.ai-msg-body sup {
    font-size: 0.76em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.ai-msg-body sup {
    top: -0.45em;
}

.ai-msg-body sub {
    bottom: -0.25em;
}

/* Tabulky uvnitř odpovědi */
.ai-msg-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.85rem;
    background: #1c1c1c;
    border: 1px solid #333333;
}

.ai-msg-body th, .ai-msg-body td {
    padding: 6px 10px;
    border: 1px solid #2e2e2e;
    text-align: left;
}

.ai-msg-body th {
    background: #252525;
    color: #ffe600;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
}

/* Zvýrazněný blok 3 bodů k manuálnímu ověření */
.ai-msg-body .ai-verification-box,
.ai-msg-body blockquote {
    background: rgba(255, 230, 0, 0.05);
    border-left: 3px solid #ffe600;
    padding: 8px 14px;
    margin: 14px 0;
    border-radius: 0 6px 6px 0;
}

/* Indikátor psaní / přemýšlení */
.ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffe600;
    font-size: 0.85rem;
    font-style: italic;
    padding: 8px 12px;
}

.ai-dots-spinner {
    display: inline-flex;
    gap: 4px;
}

.ai-dots-spinner span {
    width: 6px;
    height: 6px;
    background: #ffe600;
    border-radius: 50%;
    animation: bounceDots 1.4s infinite ease-in-out both;
}

.ai-dots-spinner span:nth-child(1) { animation-delay: -0.32s; }
.ai-dots-spinner span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounceDots {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   SPODNÍ FORMULÁŘOVÁ ČÁST
   ========================================================================== */
.ai-chat-footer {
    padding: 14px 20px;
    background: #202020;
    border-top: 1px solid #333333;
    position: relative;
}

/* Zámek pro Free účet */
.ai-locked-overlay {
    background: #202020;
    padding: 12px;
    border-radius: 6px;
    border: 1px dashed #444444;
}

.ai-locked-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.88rem;
    color: #cccccc;
}

.ai-btn-upgrade {
    background: #ffe600;
    color: #111111;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease;
}

.ai-btn-upgrade:hover {
    background: #fff04d;
}

/* Vstupní formulář pro předplatitele */
.ai-chat-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: #181818;
    border: 1px solid #444444;
    border-radius: 8px;
    padding: 6px 10px;
    transition: border-color 0.15s ease;
}

.ai-input-wrapper:focus-within {
    border-color: #ffe600;
    box-shadow: 0 0 0 1px #ffe600;
}

.ai-input-wrapper textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    resize: none;
    outline: none;
    max-height: 160px;
    padding: 4px 0;
}

.ai-submit-btn {
    background: #ffe600;
    color: #111111;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.1s ease;
}

.ai-submit-btn:hover:not(:disabled) {
    background: #fff04d;
    transform: scale(1.05);
}

.ai-submit-btn:disabled {
    background: #3a3a3a;
    color: #777777;
    cursor: not-allowed;
    transform: none;
}

.ai-input-hint {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #777777;
    padding: 0 4px;
}

/* ==========================================================================
   Fáze 2: Kontrola výpočtů a výkresů (Režim, Přílohy a Drag & Drop)
   ========================================================================== */

/* Přepínač režimu: Poradna vs. Kontrola výkresu */
.ai-chat-mode-switch {
    display: inline-flex;
    background: #1f1f1f;
    border: 1px solid #383838;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.ai-mode-btn {
    background: transparent;
    border: none;
    color: #999999;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.ai-mode-btn:hover {
    color: #ffffff;
    background: #2b2b2b;
}

.ai-mode-btn.active {
    background: #ffe600;
    color: #111111;
}

/* Tlačítko sponky v zadávacím poli */
.ai-attach-btn {
    background: transparent;
    border: none;
    color: #999999;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.ai-attach-btn:hover {
    color: #ffe600;
    background: #252525;
}

.ai-attach-btn.has-file {
    color: #ffe600;
    background: #2e2a00;
}

/* Náhledový štítek vybraného souboru (File Chip) */
.ai-attachment-preview {
    padding: 4px 0 2px 0;
}

.ai-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #222014;
    border: 1px solid #776600;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.8rem;
    color: #ffe600;
}

.ai-attachment-chip .ai-chip-icon {
    font-size: 0.95rem;
}

.ai-attachment-chip .ai-chip-filename {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-weight: 600;
}

.ai-attachment-chip .ai-chip-filesize {
    color: #aaaaaa;
    font-size: 0.72rem;
}

.ai-attachment-chip .ai-chip-remove {
    background: transparent;
    border: none;
    color: #aaaaaa;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 4px;
    transition: color 0.15s ease;
}

.ai-attachment-chip .ai-chip-remove:hover {
    color: #ff5555;
}

/* Zobrazení přiloženého souboru v bublině zprávy */
.ai-msg-attachment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #282828;
    border: 1px solid #484848;
    border-radius: 6px;
    padding: 6px 12px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: #ffe600;
}

.ai-msg-attachment i {
    font-size: 1rem;
}

.ai-msg-attachment .ai-msg-att-name {
    color: #ffffff;
    font-weight: 600;
}

.ai-msg-attachment .ai-msg-att-size {
    color: #888888;
    font-size: 0.72rem;
}

/* Drag & Drop Overlay přes celé chatovací okno */
.ai-chat-panel {
    position: relative;
}

.ai-drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 17, 17, 0.92);
    border: 2px dashed #ffe600;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ai-drag-overlay.active {
    display: flex;
}

.ai-drag-content {
    text-align: center;
    color: #ffffff;
}

.ai-drag-content i {
    font-size: 3.5rem;
    color: #ffe600;
    margin-bottom: 12px;
    animation: bounce 1.2s infinite ease-in-out;
}

.ai-drag-content p {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #ffe600;
}

.ai-drag-content small {
    color: #aaaaaa;
    font-size: 0.85rem;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ==========================================================================
   Fáze 3: AI asistent projektů – Selektor zakázky a informační banner
   ========================================================================== */

/* Selektor zakázky v hlavičce chatu */
.ai-project-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1e1e1e;
    border: 1px solid #383838;
    border-radius: 6px;
    padding: 3px 8px;
}

.ai-project-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffe600;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    margin: 0;
    cursor: default;
}

.ai-project-select {
    background: #252525;
    color: #ffffff;
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.82rem;
    cursor: pointer;
    max-width: 280px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.ai-project-select:hover, .ai-project-select:focus {
    border-color: #ffe600;
    background: #2a2a2a;
}

.ai-project-select optgroup {
    background: #181818;
    color: #ffe600;
    font-weight: 700;
    font-style: normal;
}

.ai-project-select option {
    background: #222222;
    color: #e5e5e5;
    font-weight: 400;
}

/* Kontextový banner zakázky */
.ai-project-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(255, 230, 0, 0.08) 0%, rgba(30, 30, 30, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 230, 0, 0.25);
    padding: 8px 18px;
    font-size: 0.82rem;
    color: #cccccc;
    gap: 12px;
    animation: fadeIn 0.3s ease-in-out;
}

.ai-project-banner-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ai-project-banner-tag {
    color: #ffe600;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ai-banner-proj-name {
    color: #ffffff;
    font-size: 0.88rem;
}

.ai-banner-badge {
    background: #2b2b2b;
    border: 1px solid #444;
    color: #ddd;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.ai-banner-badge.status-vprocesu {
    background: rgba(46, 204, 113, 0.15);
    border-color: #2ecc71;
    color: #2ecc71;
}

.ai-banner-badge.status-vefrontě {
    background: rgba(241, 196, 15, 0.15);
    border-color: #f1c40f;
    color: #f1c40f;
}

.ai-banner-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #aaaaaa;
    font-size: 0.78rem;
}

.ai-banner-item i {
    color: #ffe600;
}

.ai-banner-item.warning {
    color: #ff6b6b;
    font-weight: 700;
}

.ai-banner-item.warning i {
    color: #ff6b6b;
}

.ai-project-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ai-banner-btn {
    background: #292929;
    border: 1px solid #444;
    color: #ffe600;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.ai-banner-btn:hover {
    background: #333333;
    border-color: #ffe600;
    color: #ffffff;
}

.ai-banner-close {
    background: transparent;
    border: none;
    color: #888888;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s ease;
}

.ai-banner-close:hover {
    color: #ff4d4d;
}

/* Štítek zakázky v seznamu uložených konverzací */
.ai-history-info {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    flex: 1;
}

.ai-history-proj-tag {
    background: rgba(255, 230, 0, 0.12);
    border: 1px solid rgba(255, 230, 0, 0.3);
    color: #ffe600;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================================================
   Fáze 4: Autonomní agent napříč webem & Akční karty
   ========================================================================== */

/* Inline odkazy v textu odpovědi */
.ai-inline-link {
    color: #ffe600;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
    word-break: break-all;
}

.ai-inline-link:hover {
    color: #ffffff;
    text-decoration: none;
}

/* Kontejner akčních karet */
.ai-action-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

/* Základní karta */
.ai-action-card {
    background: #1b1b1b;
    border: 1px solid #383838;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.ai-action-card:hover {
    border-color: #555555;
}

.ai-action-card.ai-card-calc {
    border-left: 4px solid #ffe600;
}

.ai-action-card.ai-card-task {
    border-left: 4px solid #3b82f6;
}

.ai-action-card.ai-card-project {
    border-left: 4px solid #10b981;
}

.ai-action-card.ai-card-search {
    border-left: 4px solid #a855f7;
}

.ai-action-card.ai-card-warning {
    border-left: 4px solid #ef4444;
}

/* Hlavička karty */
.ai-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.ai-card-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-card-icon {
    font-size: 1.25rem;
    color: #ffe600;
    width: 24px;
    text-align: center;
}

.ai-card-task .ai-card-icon {
    color: #60a5fa;
}

.ai-card-project .ai-card-icon {
    color: #34d399;
}

.ai-card-search .ai-card-icon {
    color: #c084fc;
}

.ai-card-title {
    display: block;
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 700;
}

.ai-card-sub {
    display: block;
    font-size: 0.78rem;
    color: #999999;
    margin-top: 2px;
}

/* Odznáčky na kartě */
.ai-card-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ai-badge-saved {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ai-badge-ready {
    background: rgba(255, 230, 0, 0.12);
    color: #ffe600;
    border: 1px solid rgba(255, 230, 0, 0.3);
}

.ai-badge-task {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.ai-badge-proj {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Souhrn a metadata na kartě */
.ai-card-summary {
    font-size: 0.86rem;
    color: #d1d5db;
    line-height: 1.45;
    margin: 8px 0;
    padding: 8px 10px;
    background: #141414;
    border-radius: 5px;
}

.ai-card-meta {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-bottom: 8px;
}

/* Tlačítka na kartě */
.ai-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.ai-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-btn-primary {
    background: #ffe600;
    color: #111111;
    border: 1px solid #ffe600;
}

.ai-btn-primary:hover {
    background: #ffd000;
    color: #000000;
    transform: translateY(-1px);
}

.ai-btn-secondary {
    background: #2a2a2a;
    color: #e5e5e5;
    border: 1px solid #444444;
}

.ai-btn-secondary:hover {
    background: #333333;
    color: #ffffff;
    border-color: #ffe600;
    transform: translateY(-1px);
}

/* Seznam výsledků vyhledávání */
.ai-card-search-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.ai-search-result-item {
    display: block;
    background: #151515;
    border: 1px solid #2d2d2d;
    border-radius: 5px;
    padding: 8px 12px;
    text-decoration: none;
    color: #e5e5e5;
    transition: all 0.15s ease;
}

.ai-search-result-item:hover {
    background: #222222;
    border-color: #a855f7;
    color: #ffffff;
}

.ai-search-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
}

.ai-search-item-header i {
    color: #c084fc;
}

.ai-search-item-badge {
    margin-left: auto;
    font-size: 0.7rem;
    color: #a1a1aa;
    background: #27272a;
    padding: 1px 6px;
    border-radius: 3px;
}

.ai-search-item-desc {
    margin: 4px 0 0 0;
    font-size: 0.78rem;
    color: #9ca3af;
    line-height: 1.35;
}

