/*
Theme Name: Hello Elementor Child
Description: Child theme of Hello Elementor with ILTS enhancements
Template: hello-elementor
Version: 1.0.0
*/

/* ILTS - Globální nastavení fontu s podporou českých znaků */
body,
html,
* {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, "DejaVu Sans", "Liberation Sans", Arial, sans-serif !important;
}

/* Specifické přepsání pro Elementor elementy */
.elementor-widget,
.elementor-widget *,
.elementor-heading-title,
.elementor-text-editor,
.elementor-button,
.elementor-form-fields-wrapper,
.elementor-field-group,
.elementor-field,
input,
textarea,
select,
button {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, "DejaVu Sans", "Liberation Sans", Arial, sans-serif !important;
}

/* ILTS - Ultra agresivní přepsání Elementor CSS proměnných a specifických selektorů */
[class*="elementor"] .elementor-heading-title,
[class*="elementor"] .elementor-widget-heading .elementor-heading-title,
[class*="elementor"] .elementor-text-editor,
[class*="elementor"] .elementor-widget-text-editor,
[class*="elementor"] .elementor-widget p,
[class*="elementor"] .elementor-widget span,
[class*="elementor"] .elementor-widget div,
[class*="elementor"] .elementor-widget h1,
[class*="elementor"] .elementor-widget h2,
[class*="elementor"] .elementor-widget h3,
[class*="elementor"] .elementor-widget h4,
[class*="elementor"] .elementor-widget h5,
[class*="elementor"] .elementor-widget h6,
[class*="elementor"] .elementor-button,
[class*="elementor"] .elementor-button-text,
div[class*="elementor"] .elementor-heading-title,
div[class*="elementor"] .elementor-widget-heading .elementor-heading-title,
section[class*="elementor"] .elementor-heading-title,
section[class*="elementor"] .elementor-widget-heading .elementor-heading-title {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, "DejaVu Sans", "Liberation Sans", Arial, sans-serif !important;
}

/* ILTS - Přepsání CSS proměnných Elementoru pro font-family */
:root {
    --e-global-typography-primary-font-family: "Segoe UI", Tahoma, Geneva, Verdana, "DejaVu Sans", "Liberation Sans", Arial, sans-serif !important;
    --e-global-typography-secondary-font-family: "Segoe UI", Tahoma, Geneva, Verdana, "DejaVu Sans", "Liberation Sans", Arial, sans-serif !important;
    --e-global-typography-text-font-family: "Segoe UI", Tahoma, Geneva, Verdana, "DejaVu Sans", "Liberation Sans", Arial, sans-serif !important;
    --e-global-typography-accent-font-family: "Segoe UI", Tahoma, Geneva, Verdana, "DejaVu Sans", "Liberation Sans", Arial, sans-serif !important;
}

/* ILTS - Přepsání všech možných Elementor CSS proměnných pro typografii */
:root {
    --e-global-typography-c15fb77-font-family: "Segoe UI", Tahoma, Geneva, Verdana, "DejaVu Sans", "Liberation Sans", Arial, sans-serif !important;
}

/* ILTS - Zajištění, že se Sans-serif nikde nepoužije */
* {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, "DejaVu Sans", "Liberation Sans", Arial, sans-serif !important;
}
*[style*="font-family"] {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, "DejaVu Sans", "Liberation Sans", Arial, sans-serif !important;
}

/* ILTS - Enhanced File Upload Styles */
.elementor-field-type-upload {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Agresivní skrytí původního upload pole */
.elementor-field-type-upload .elementor-upload-field,
.elementor-field-type-upload input[type="file"],
.elementor-field-type-upload > div:not([class*="enhanced"]),
.elementor-field-type-upload > *:not(.enhanced-upload-instructions):not(.enhanced-file-drop-zone):not(.enhanced-file-list) {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.enhanced-file-drop-zone {
    border: 2px dashed #007cba;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    box-sizing: border-box;
}

.enhanced-file-drop-zone:hover,
.enhanced-file-drop-zone.drag-over {
    border-color: #005a87;
    background: linear-gradient(135deg, #e6f3ff 0%, #cce7ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.2);
}

.enhanced-file-drop-zone .drop-icon {
    font-size: 48px;
    color: #007cba;
    margin-bottom: 10px;
    line-height: 1;
}

.enhanced-file-drop-zone .drop-text {
    font-size: 16px;
    font-weight: 600;
    color: #007cba;
    margin-bottom: 5px;
}

.enhanced-file-drop-zone .drop-subtext {
    font-size: 12px;
    color: #666;
}

.enhanced-file-list {
    margin-top: 15px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.enhanced-file-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.enhanced-file-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.enhanced-file-item.success {
    border-color: #28a745;
    background: #f8fff9;
}

.enhanced-file-icon {
    width: 40px;
    height: 40px;
    background: #007cba;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 10px;
    margin-right: 12px;
    flex-shrink: 0;
}

.enhanced-file-icon.success {
    background: #28a745;
}

.enhanced-file-details {
    flex-grow: 1;
    min-width: 0;
}

.enhanced-file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    word-break: break-word;
    font-size: 14px;
}

.enhanced-file-info {
    font-size: 11px;
    color: #666;
    display: flex;
    gap: 8px;
}

.enhanced-file-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

.enhanced-file-remove:hover {
    background: #c82333;
}

.enhanced-file-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: #007cba;
    transition: width 0.3s ease;
    width: 0%;
}

.enhanced-file-progress.success {
    background: #28a745;
}

/* ILTS - Hezké hledání v2 (Pretty Search) */
:root {
    --ilts-radius: 9999px;
    --ilts-shadow: 0 6px 24px rgba(0,0,0,.08);
    --ilts-border: 1px solid rgba(0,0,0,.08);
    --ilts-bg: #fff;
    --ilts-text: #111;
    --ilts-sub: #6b7280;
    --ilts-accent: #2C4C74;
    --ilts-accent-light: #e8eef5;
    --ilts-green: #96c13f;
}

.ilts-search .elementor-search-form {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.ilts-search .elementor-search-form__container {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--ilts-bg);
    border: 2px solid #e5e7eb;
    border-radius: var(--ilts-radius);
    padding: .5rem .75rem .5rem 1rem;
    box-shadow: var(--ilts-shadow);
    transition: all .25s ease;
}

.ilts-search .elementor-search-form__container:focus-within {
    border-color: var(--ilts-accent);
    box-shadow: 0 10px 40px rgba(44,76,116,.15);
    transform: translateY(-1px);
}

.ilts-search .elementor-search-form__input {
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    background: transparent;
    width: 100%;
    padding: .4rem .25rem;
    font-size: 16px;
    color: var(--ilts-text);
}

.ilts-search .elementor-search-form__input::placeholder {
    color: #9ca3af;
}

.ilts-search .elementor-search-form__submit {
    border-radius: 9999px;
    padding: .6rem 1rem;
    border: 0;
    background: var(--ilts-accent);
    color: #fff;
    font-weight: 600;
    transition: all .2s ease;
    flex-shrink: 0;
}

.ilts-search .elementor-search-form__submit:hover {
    background: #1a3a5c;
    transform: scale(1.02);
}

.ilts-search .elementor-search-form__submit:active {
    transform: scale(0.98);
}

/* Clear button – skrytý, dokud není text */
.ilts-search .ilts-clear {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: #f3f4f6;
    cursor: pointer;
    opacity: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all .2s ease;
    pointer-events: none;
}

.ilts-search .ilts-clear.show {
    opacity: 1;
    pointer-events: auto;
}

.ilts-search .ilts-clear:hover {
    background: #e5e7eb;
    color: #111;
}

/* === Dropdown === */
.ilts-search .ilts-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.05);
    overflow: hidden;
    z-index: 99999;
    display: none;
    max-height: 420px;
    overflow-y: auto;
}

.ilts-search .ilts-suggest.visible {
    display: block;
    animation: ilts-dropdown-in .15s ease;
}

@keyframes ilts-dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Jednotlivé výsledky */
.ilts-search .ilts-suggest-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .875rem 1.125rem;
    text-decoration: none !important;
    color: var(--ilts-text) !important;
    border-bottom: 1px solid #f3f4f6;
    transition: background .12s ease;
}

.ilts-search .ilts-suggest-item:last-of-type {
    border-bottom: 1px solid #e5e7eb;
}

.ilts-search .ilts-suggest-item:hover,
.ilts-search .ilts-suggest-item.active {
    background: var(--ilts-accent-light);
}

.ilts-search .ilts-suggest-item.active {
    background: var(--ilts-accent-light);
    outline: 2px solid var(--ilts-accent);
    outline-offset: -2px;
}

.ilts-search .ilts-suggest-item-body {
    flex: 1;
    min-width: 0;
}

.ilts-search .ilts-suggest-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
    color: var(--ilts-text);
    margin-bottom: 2px;
}

.ilts-search .ilts-suggest-title .ilts-match {
    color: var(--ilts-accent);
    font-weight: 700;
    background: var(--ilts-accent-light);
    padding: 0 2px;
    border-radius: 2px;
}

.ilts-search .ilts-suggest-excerpt {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ilts-sub);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ilts-search .ilts-suggest-type {
    font-size: 11px;
    color: var(--ilts-sub);
    padding: .15rem .55rem;
    border-radius: 999px;
    background: #f3f4f6;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
    font-weight: 500;
}

/* Empty & loading stavy */
.ilts-search .ilts-suggest-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--ilts-sub);
}

.ilts-search .ilts-suggest-empty-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.ilts-search .ilts-suggest-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.ilts-search .ilts-suggest-loading {
    padding: 1rem 1.125rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ilts-sub);
    font-size: 14px;
}

/* Spinner */
.ilts-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-top-color: var(--ilts-accent);
    border-radius: 50%;
    animation: ilts-spin .6s linear infinite;
}

@keyframes ilts-spin {
    to { transform: rotate(360deg); }
}

/* "Zobrazit všechny výsledky" */
.ilts-search .ilts-suggest-all {
    display: block;
    padding: .75rem 1.125rem;
    text-align: center;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ilts-accent) !important;
    text-decoration: none !important;
    background: #f9fafb;
    transition: background .15s ease;
}

.ilts-search .ilts-suggest-all:hover {
    background: var(--ilts-accent-light);
    color: var(--ilts-accent) !important;
}

/* === Stránka výsledků hledání === */
.ilts-search-results .elementor-posts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .ilts-search-results .elementor-posts-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ilts-search-results .elementor-posts-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ilts-search-results .elementor-post {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: var(--ilts-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    overflow: hidden;
    transition: all .2s ease;
}

.ilts-search-results .elementor-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0,0,0,.1);
    border-color: var(--ilts-accent);
}

.ilts-search-results .elementor-post__thumbnail img {
    display: block;
    width: 100%;
    height: auto;
}

.ilts-search-results .elementor-post__text {
    padding: 16px 18px 18px;
}

.ilts-search-results .elementor-post__title a {
    color: var(--ilts-text);
    text-decoration: none;
    font-weight: 600;
}

.ilts-search-results .elementor-post__title a:hover {
    color: var(--ilts-accent);
}

.ilts-search-results mark {
    background: rgba(150,193,63,.25);
    color: inherit;
    padding: .06em .2em;
    border-radius: .2em;
    font-weight: 600;
}

/* Responzivní dropdown na mobilu */
@media (max-width: 640px) {
    .ilts-search .ilts-suggest {
        border-radius: 12px;
        max-height: 320px;
    }
    .ilts-search .elementor-search-form {
        max-width: 100%;
    }
    .ilts-search .ilts-suggest-item {
        padding: .75rem .875rem;
    }
    .ilts-search .ilts-suggest-excerpt {
        -webkit-line-clamp: 1;
    }
}

/* ILTS - Viditelné odkazy v textu - zelené, tučně, bez podtržítka */
.elementor-widget-text-editor a,
.elementor-text-editor a,
.entry-content a,
.post-content a,
.page-content a,
.elementor-widget p a,
.elementor-widget-heading a,
.elementor-widget-heading a strong,
.elementor-text-editor p a,
.wp-block-paragraph a,
.content-area a {
    text-decoration: none !important;
    color: #96c13f !important;
    font-weight: bold !important;
    transition: color 0.3s ease;
}

.elementor-widget-text-editor a:hover,
.elementor-text-editor a:hover,
.entry-content a:hover,
.post-content a:hover,
.page-content a:hover,
.elementor-widget p a:hover,
.elementor-widget-heading a:hover,
.elementor-widget-heading a:hover strong,
.elementor-text-editor p a:hover,
.wp-block-paragraph a:hover,
.content-area a:hover {
    color: #2C4C74 !important;
    text-decoration: none !important;
    font-weight: bold !important;
}

/* ILTS - Drobečková navigace */
.elementor-breadcrumbs {
    font-size: 14px;
    margin-bottom: 20px;
    padding: 10px 0;
}

.elementor-breadcrumbs a {
    color: #007cba !important;
    text-decoration: none !important;
}

.elementor-breadcrumbs a:hover {
    color: #005a87 !important;
    text-decoration: underline !important;
}

.elementor-breadcrumbs .elementor-breadcrumbs-separator {
    margin: 0 8px;
    color: #666;
}

.elementor-breadcrumbs .elementor-breadcrumbs-current {
    color: #333;
    font-weight: 600;
}

/* ILTS - Oprava viditelnosti čísel v Elementor form indikátorech */
.e-form__indicators__indicator__number,
.e-form__indicators__indicator--state-active .e-form__indicators__indicator__number,
.e-form__indicators__indicator--state-inactive .e-form__indicators__indicator__number,
.e-form__indicators__indicator--state-completed .e-form__indicators__indicator__number {
    color: #000000 !important;
    background-color: transparent !important;
    font-weight: bold !important;
}

/* Zajištění viditelnosti pro všechny možné stavy */
.e-form__indicators .e-form__indicators__indicator__number {
    color: #000000 !important;
    text-shadow: none !important;
}

/* Specifické přepsání pro aktivní stav */
.e-form__indicators__indicator--state-active .e-form__indicators__indicator__number {
    color: #000000 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid #2C4C74 !important;
}

/* Specifické přepsání pro neaktivní stav */
.e-form__indicators__indicator--state-inactive .e-form__indicators__indicator__number {
    color: #000000 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid #cccccc !important;
}

/* ============================================
   ILTS - Zvýraznění potvrzení odeslání formuláře
   ============================================ */
.elementor-message.elementor-message-success,
.elementor-form .elementor-message-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    color: #155724 !important;
    border: 2px solid #28a745 !important;
    border-radius: 8px !important;
    padding: 20px 25px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-top: 20px !important;
    animation: ilts-success-fade 0.5s ease-in-out !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2) !important;
}

.elementor-message.elementor-message-success::before {
    content: '✓ ' !important;
    font-size: 22px !important;
}

@keyframes ilts-success-fade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ILTS - Nadpis výsledků vyhledávání
   ============================================ */
.ilts-results-heading {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
}

.ilts-results-heading h2 {
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

.ilts-results-heading h2 em {
    color: #0ea5e9;
    font-style: normal;
}

/* ============================================
   ILTS - Fixní jazykový přepínač (mobil/tablet)
   ============================================ */
.ilts-lang-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 75%;
    background: #2C4C74;
    padding: 8px 15px;
    justify-content: center;
    gap: 10px;
    z-index: 99998;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    border-radius: 0 8px 0 0;
}

@media (max-width: 1024px) {
    .ilts-lang-bar {
        display: flex;
    }
    body {
        padding-bottom: 56px;
    }
}

.ilts-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255,255,255,0.15);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 20px;
    font-weight: 600 !important;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.ilts-lang-btn:hover {
    background: rgba(255,255,255,0.25);
    color: #ffffff !important;
}

.ilts-lang-btn.active {
    background: #ffffff;
    color: #2C4C74 !important;
    border-color: #96c13f;
}

/* Inline verze shortcode [ilts_lang_switcher] */
.ilts-lang-inline {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.ilts-lang-inline .ilts-lang-btn {
    background: #f0f0f0;
    color: #333 !important;
    padding: 6px 14px;
    font-size: 13px;
}

.ilts-lang-inline .ilts-lang-btn.active {
    background: #2C4C74;
    color: #ffffff !important;
}

.ilts-lang-inline .ilts-lang-btn:hover {
    background: #e0e0e0;
    color: #333 !important;
}

.ilts-lang-inline .ilts-lang-btn.active:hover {
    background: #1a3a5c;
    color: #ffffff !important;
}
