/**
 * Nanotrix AI Vyhledávání - CSS Stylesheet
 * Version: 3.7.0
 * Author: Město Ivančice & Aleš Tichý
 */

/* 1. Vyhledávací formulář (Hlavička i Stránka) */
.nanotrix-search-wrapper {
    width: 100%;
    margin-bottom: 20px;
}

.nanotrix-search-form {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.nanotrix-search-input {
    width: 100%;
    padding: 12px 45px 12px 16px;
    font-size: 16px;
    border: 2px solid #0056b3;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: #ffffff;
    color: #333333;
}

.nanotrix-search-input:focus {
    border-color: #003d82;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
}

.nanotrix-search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0056b3;
    transition: color 0.2s ease;
}

.nanotrix-search-submit:hover {
    color: #003d82;
}

.nanotrix-search-submit svg {
    width: 22px;
    height: 22px;
}

/* 2. Dvousloupcový Grid na stránce výsledků */
.ivancice-search-grid {
    display: flex;
    gap: 24px;
    margin-top: 25px;
    align-items: flex-start;
}

.ivancice-ai-column,
.ivancice-native-column {
    flex: 1;
    min-width: 0; /* Zabraňuje přetečení flexboxu */
}

.ivancice-column-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a252f;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

/* 3. Levý sloupec - AI Box (Vanglík) */
.nanotrix-ai-box {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #0056b3;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.nanotrix-ai-body {
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
}

.nanotrix-ai-history {
    margin-bottom: 15px;
}

.nanotrix-history-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.nanotrix-history-q {
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px dashed #cbd5e1;
}

/* Tlačítka odkazů generovaná z Markdownu */
.nanotrix-source-btn {
    display: inline-block;
    background-color: #e2e8f0;
    color: #1e293b;
    padding: 3px 8px;
    margin: 3px 2px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nanotrix-source-btn:hover {
    background-color: #0056b3;
    color: #ffffff;
    text-decoration: none;
}

/* Formulář pro doplňující dotaz */
.nanotrix-followup-form {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.nanotrix-followup-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.nanotrix-followup-input:focus {
    border-color: #0056b3;
}

.nanotrix-followup-submit {
    background-color: #0056b3;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nanotrix-followup-submit:hover {
    background-color: #003d82;
}

.nanotrix-ai-footer {
    margin-top: 12px;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

/* 4. Spinner načítání */
.nanotrix-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 86, 179, 0.2);
    border-radius: 50%;
    border-top-color: #0056b3;
    animation: nanotrix-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

.nanotrix-status-text {
    font-style: italic;
    color: #64748b;
}

@keyframes nanotrix-spin {
    to { transform: rotate(360deg); }
}

/* 5. Pravý sloupec - Standardní WP výsledky */
.nanotrix-native-results-box {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.ivancice-native-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ivancice-native-item {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.ivancice-native-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ivancice-native-link {
    font-size: 16px;
    font-weight: 600;
    color: #0056b3;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 4px;
}

.ivancice-native-link:hover {
    text-decoration: underline;
    color: #003d82;
}

.ivancice-native-excerpt {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.ivancice-no-results {
    color: #64748b;
    font-style: italic;
    margin: 0;
}

/* 6. Responsivita pro mobilní zařízení */
@media (max-width: 768px) {
    .ivancice-search-grid {
        flex-direction: column;
        gap: 20px;
    }
    
    .iv