/* ============================================
   VYHĽADÁVANIE - SEARCH STYLES
   ============================================ */

/* Vyhľadávacie pole v hlavičke */
.header_search {
    display: flex;
    align-items: center;
    margin-left: 20px;
    margin-right: 20px;
}

.header_search .search-form {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.header.dark .header_search .search-form {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.header_search .search-field {
    width: 200px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: width 0.3s ease;
}

.header.dark .header_search .search-field {
    /*color: #333;*/
}

.header_search .search-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.header.dark .header_search .search-field::placeholder {
    /*color: rgba(0, 0, 0, 0.4);*/
}

.header_search .search-field:focus {
    width: 250px;
}

.header_search .search-submit {
    padding: 10px 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
}

.header.dark .header_search .search-submit {
    /*color: #333;*/
}

.header_search .search-submit:hover {
    transform: scale(1.1);
}

.header_search .search-submit svg {
    width: 18px;
    height: 18px;
}

/* Badge na obrázkoch */
.result-type-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #0066cc;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
    letter-spacing: 0.5px;
}

.result-type-badge[data-post-type="produkth"] {
    background: #28a745 !important;
}

.result-type-badge[data-post-type="produktv"] {
    background: #17a2b8 !important;
}

.result-type-badge[data-post-type="instalacia"] {
    background: #ffc107 !important;
    color: #333 !important;
}

.result-type-badge[data-post-type="post"] {
    background: #6c757d !important;
}

.result-type-badge[data-post-type="page"] {
    background: #e83e8c !important;
}

/* Výsledky vyhľadávania - blog layout */
.results-count {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* Kategórie vo výsledkoch */
.result-categories {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.result-categories a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-categories a:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* Zvýraznenie hľadaného výrazu */
.search-highlight,
mark.search-highlight {
    background: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Stránkovanie */
.search-pagination {
    margin-top: 50px;
    text-align: center;
}

.search-pagination .page-numbers {
    display: inline-block;
    margin: 0 5px;
    padding: 10px 15px;
    background: #fff;
    color: #333;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.search-pagination .page-numbers:hover,
.search-pagination .page-numbers.current {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* Žiadne výsledky */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results > p {
    font-size: 20px;
    color: #666;
    margin-bottom: 40px;
}

.suggestions {
    max-width: 500px;
    margin: 0 auto 40px;
    text-align: left;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.suggestions h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestions ul li {
    padding: 8px 0;
    color: #666;
    position: relative;
    padding-left: 25px;
}

.suggestions ul li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #0066cc;
    font-weight: bold;
}

.browse-categories {
    max-width: 500px;
    margin: 0 auto;
}

.browse-categories h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.browse-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 15px;
}

.browse-categories ul li a {
    display: block;
    padding: 15px 25px;
    background: #fff;
    color: #0066cc;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.browse-categories ul li a:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
}

/* Live Search (AJAX) */
.live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
}

.live-search-results .search-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.live-search-results .search-item:hover {
    background: #f8f9fa;
}

.live-search-results .search-item:last-child {
    border-bottom: none;
}

.live-search-results .item-type {
    display: inline-block;
    padding: 3px 10px;
    background: #e0e0e0;
    color: #666;
    font-size: 11px;
    border-radius: 3px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.live-search-results .item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.live-search-results .item-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.live-search-results .no-results {
    padding: 20px;
    text-align: center;
    color: #999;
}

/* Loading indikátor */
.search-loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

.search-loading:after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* Responzívne štýly */
@media (max-width: 1024px) {
    .header_search .search-field {
        width: 150px;
    }

    .header_search .search-field:focus {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .header_search {
        order: 3;
        width: 100%;
        margin: 15px 0 0 0;
    }

    .header_search .search-form {
        width: 100%;
    }

    .header_search .search-field {
        width: 100%;
    }

    .header_search .search-field:focus {
        width: 100%;
    }

    .result-type-badge {
        font-size: 10px;
        padding: 3px 10px;
        top: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .search-form-inline {
        border-radius: 25px !important;
    }

    .search-form-inline .search-submit {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}
