/* ============================================================
   pridat-dotaznik.css — Fajn Účet
   Styly specifické pro stránku "Dotazník zájmů".
   Obecné styly (layout, sidebar, header…) jsou v obecne.css.
   ============================================================ */

/* =============================================================
   LAYOUT STRÁNKY
   ============================================================= */
.dotaznik-page {
    padding-bottom: 3rem;
}

/* =============================================================
   BANNER KARTA (světlý oranžový gradient s ilustrací a tagy)
   ============================================================= */
.dotaznik-banner-card {
    margin-bottom: 1.5rem;
    padding: 0;
    background: linear-gradient(135deg, hsl(40 55% 95%) 0%, hsl(36 80% 90%) 35%, hsl(33 85% 80%) 100%);
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.dotaznik-banner-content {
    display: flex;
    align-items: stretch;
    min-height: 0;
}

/* Ilustrace — levá strana */
.dotaznik-banner-illustration {
    flex-shrink: 0;
    width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0 0 0.5rem;
    position: relative;
}

.dotaznik-banner-illustration img {
    width: 120px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Text blok — pravá strana */
.dotaznik-banner-text {
    flex: 1;
    padding: 1.5rem 1.75rem 1.5rem 0.5rem;
}

.dotaznik-banner-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .dotaznik-banner-title { font-size: 1.375rem; }
}

.dotaznik-banner-desc {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
    margin-bottom: 1.125rem;
}

/* Tagy — 3 sloupce, 2 řádky */
.dotaznik-banner-tags {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 1.625rem 2.5rem;
    justify-content: stretch;
}

.dotaznik-banner-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    white-space: nowrap;
}

/* Kolečkové checkmarky */
.dotaznik-tag-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dotaznik-tag-circle svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 3;
}

.dotaznik-tag-circle--green  { background: #dcfce7; color: #33b061; }
.dotaznik-tag-circle--blue   { background: #dbeafe; color: #497eef; }
.dotaznik-tag-circle--lime   { background: #ffedd5; color: #ee7331; }
.dotaznik-tag-circle--purple { background: #f3e8ff; color: #a95def; }
.dotaznik-tag-circle--coral  { background: #fce7f3; color: #e45997; }
.dotaznik-tag-circle--yellow { background: #fef9c3; color: #daae42; }

/* Mobil — banner */
@media (max-width: 639px) {
    .dotaznik-banner-content { flex-direction: column; }
    .dotaznik-banner-illustration {
        width: 100%;
        height: 80px;
        padding: 0.75rem 0 0;
        justify-content: center;
    }
    .dotaznik-banner-illustration img { width: 80px; }
    .dotaznik-banner-text {
        padding: 1rem 1.25rem 1.25rem;
        text-align: center;
    }
    .dotaznik-banner-tags {
        grid-template-columns: repeat(2, auto);
        justify-content: center;
    }
}

/* =============================================================
   AI ASISTENT KARTA
   ============================================================= */
.dotaznik-ai-card {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dotaznik-ai-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid hsl(var(--border));
}

.dotaznik-ai-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: hsl(var(--primary) / 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--primary));
    flex-shrink: 0;
}

.dotaznik-ai-title {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.dotaznik-ai-subtitle {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.125rem;
}

.dotaznik-ai-chat {
    flex: 1;
    min-height: 12rem;
    max-height: 20rem;
    overflow-y: auto;
    padding: 1.25rem;
}

.dotaznik-ai-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dotaznik-ai-message:last-child { margin-bottom: 0; }

.dotaznik-ai-message-avatar {
    width: 2rem;
    height: 2rem;
    background: hsl(var(--primary) / 0.15);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--primary));
    flex-shrink: 0;
}

.dotaznik-ai-message-bubble {
    background: hsl(var(--muted) / 0.5);
    border: 1px solid hsl(var(--border));
    border-radius: 0 0.75rem 0.75rem 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    line-height: 1.5;
    max-width: 85%;
}

/* Zpráva uživatele — vpravo */
.dotaznik-ai-message.user { flex-direction: row-reverse; }

.dotaznik-ai-message.user .dotaznik-ai-message-avatar {
    background: hsl(var(--accent) / 0.15);
    color: hsl(var(--accent));
}

.dotaznik-ai-message.user .dotaznik-ai-message-bubble {
    background: hsl(var(--primary));
    color: white;
    border-color: hsl(var(--primary));
    border-radius: 0.75rem 0 0.75rem 0.75rem;
}

/* Input řádek */
.dotaznik-ai-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.3);
}

.dotaznik-ai-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    background: white;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    font-family: inherit;
    transition: all 0.15s;
}

.dotaznik-ai-input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.dotaznik-ai-input::placeholder { color: hsl(var(--muted-foreground)); }

.dotaznik-ai-send {
    width: 2.75rem;
    height: 2.75rem;
    background: hsl(var(--primary));
    color: white;
    border: none;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}

.dotaznik-ai-send:hover {
    background: hsl(var(--primary) / 0.85);
    transform: translateY(-1px);
}

/* =============================================================
   FORMULÁŘ — SEKCE (nadpisy s číslem)
   ============================================================= */
.dotaznik-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .dotaznik-card { padding: 2rem; }
}

.dotaznik-section {
    padding-bottom: 2rem;
    border-bottom: 1px solid hsl(var(--border));
    margin-bottom: 2rem;
}

.dotaznik-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.dotaznik-section-title {
    font-size: 1.125rem;
    font-weight: bold;
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.dotaznik-section-number {
    width: 1.75rem;
    height: 1.75rem;
    background: hsl(var(--primary));
    color: white;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.dotaznik-section-desc {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

/* =============================================================
   TAGY (typy práce, města, směny) — pilulkový tvar
   ============================================================= */
.dotaznik-tags-grid {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dotaznik-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid hsl(var(--border));
    border-radius: 9999px;
    background: white;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    user-select: none;
}

.dotaznik-tag:hover {
    border-color: hsl(var(--primary) / 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.dotaznik-tag .tag-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dotaznik-tag .tag-check { display: none; }

.dotaznik-tag:has(.tag-checkbox:checked) {
    background: hsl(var(--primary) / 0.1);
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.dotaznik-tag:has(.tag-checkbox:checked) .tag-check {
    display: block;
    color: hsl(var(--primary));
}

.dotaznik-tag:has(.tag-checkbox:checked) .tag-label {
    color: hsl(var(--primary));
}

/* =============================================================
   FORMULÁŘOVÉ PRVKY
   ============================================================= */
.dotaznik-form-group { margin-bottom: 1rem; }

.dotaznik-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

.dotaznik-form-input,
.dotaznik-form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    background: hsl(var(--muted) / 0.5);
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    transition: all 0.15s;
    font-family: inherit;
}

.dotaznik-form-input:focus,
.dotaznik-form-select:focus {
    outline: none;
    border-color: hsl(var(--primary));
    background: white;
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.dotaznik-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .dotaznik-form-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================================
   JAZYKY
   ============================================================= */
.dotaznik-jazyky-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dotaznik-jazyk-item {
    background: hsl(var(--muted) / 0.3);
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    overflow: hidden;
}

.dotaznik-jazyk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.dotaznik-jazyk-header:hover { background: hsl(var(--muted) / 0.5); }

.dotaznik-jazyk-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--foreground));
}

.dotaznik-jazyk-nazev {
    font-weight: 500;
    font-size: 0.875rem;
}

.dotaznik-jazyk-uroven {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-left: 0.25rem;
}

.dotaznik-jazyk-body {
    display: none;
    padding: 0 1rem 1rem;
}

.dotaznik-jazyk-item.expanded .dotaznik-jazyk-body { display: block; }

.dotaznik-jazyk-fields {
    display: flex;
    gap: 0.75rem;
}

.dotaznik-jazyk-fields > div { flex: 1; }

/* =============================================================
   TOGGLE SWITCH (Řidičský průkaz)
   ============================================================= */
.dotaznik-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: hsl(var(--muted) / 0.3);
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
}

.dotaznik-toggle-info { flex: 1; }

.dotaznik-toggle-title {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.dotaznik-toggle-desc {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
}

.dotaznik-toggle {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.625rem;
    flex-shrink: 0;
    cursor: pointer;
}

.dotaznik-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.dotaznik-toggle-slider {
    position: absolute;
    inset: 0;
    background: hsl(var(--border));
    border-radius: 9999px;
    transition: all 0.2s;
}

.dotaznik-toggle-slider::before {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    left: 0.1875rem;
    bottom: 0.1875rem;
    background: white;
    border-radius: 9999px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.dotaznik-toggle input:checked + .dotaznik-toggle-slider {
    background: hsl(var(--primary));
}

.dotaznik-toggle input:checked + .dotaznik-toggle-slider::before {
    transform: translateX(1.375rem);
}

/* Tagy řidičáku — zobrazí se po zapnutí toggleu */
.dotaznik-ridicak-tags {
    display: none;
    margin-top: 1rem;
}

.dotaznik-ridicak-tags.visible { display: block; }

/* =============================================================
   NASTAVENÍ VIDITELNOSTI
   ============================================================= */
.dotaznik-viditelnost-desc {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

.dotaznik-viditelnost-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dotaznik-viditelnost-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 2px solid hsl(var(--border));
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    background: white;
}

.dotaznik-viditelnost-option:hover {
    border-color: hsl(var(--primary) / 0.4);
}

.dotaznik-viditelnost-option.active {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.04);
}

.dotaznik-viditelnost-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: hsl(var(--muted));
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
    transition: all 0.15s;
}

.dotaznik-viditelnost-option.active .dotaznik-viditelnost-icon {
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
}

.dotaznik-viditelnost-text { flex: 1; }

.dotaznik-viditelnost-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.dotaznik-viditelnost-subtitle {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.125rem;
}

.dotaznik-viditelnost-radio {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: hsl(var(--primary));
    flex-shrink: 0;
    cursor: pointer;
}

/* =============================================================
   TLAČÍTKA FORMULÁŘE
   ============================================================= */
.dotaznik-form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--border));
}

.dotaznik-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    background: hsl(var(--primary));
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.dotaznik-submit-btn:hover {
    background: hsl(var(--primary) / 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 640px) {
    .dotaznik-submit-btn {
        flex: initial;
        min-width: 12rem;
    }
}

.dotaznik-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: white;
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.dotaznik-cancel-btn:hover {
    background: hsl(var(--secondary));
    border-color: hsl(var(--primary) / 0.3);
}

/* =============================================================
   PŘIDAT TLAČÍTKO (jazyky)
   ============================================================= */
.dotaznik-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid hsl(var(--border));
    background: white;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    color: hsl(var(--foreground));
    margin-top: 0.75rem;
}

.dotaznik-add-btn:hover {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
}
