/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    color: var(--bold, #333);
    padding: 20px;
    z-index: 9998;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 2px solid var(--zbarva, #005a87);
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-consent-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.cookie-consent-text p {
    margin: 0 0 5px 0;
}

.cookie-consent-text a {
    color: var(--modra_hlavni, #007cba);
    text-decoration:none;
    transition: all 0.3s ease;
}

.cookie-consent-text a:hover {
    color: var(--zbarva, #005a87);
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-consent-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-consent-buttons .cookie-consent-btn.accept {
    background: var(--modra_hlavni, #007cba);
    color: white;
}

.cookie-consent-buttons .cookie-consent-btn.accept:hover {
    background: var(--tmava_barva, #005a87);
    transform: translateY(-1px);
}

.cookie-consent-buttons .cookie-consent-btn.decline {
    background: var(--sediva_pozadi, #f0f0f0);
    color: var(--sediva_hlavni, #666);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent-buttons .cookie-consent-btn.decline:hover {
    background: grey;
    color: white
}

/* Responsive design */
@media (max-width: 768px) {
    .cookie-consent {
        padding: 15px;
    }
    
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-consent-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .cookie-consent-btn {
        flex: 1;
        padding: 12px 16px;
    }
    
    .cookie-consent-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-buttons {
        flex-direction: column;
    }
    
    .cookie-consent-btn {
        width: 100%;
    }
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    opacity: 1;
    visibility: visible;
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.page-loader .loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--modra_hlavni, #007cba);
    border-radius: 50%;
    animation: loaderSpin 1s linear infinite;
    margin-bottom: 20px;
}

.page-loader .loader-text {
    font-size: 16px;
    color: var(--text, #333);
    font-weight: 500;
}

@keyframes loaderSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive loader */
@media (max-width: 768px) {
    .page-loader .loader-spinner {
        width: 50px;
        height: 50px;
        border-width: 3px;
    }

    .page-loader .loader-text {
        font-size: 14px;
    }
}

/* Styly pro vyhledávací tlačítko v menu */
.menu-right .search-button {
    border: 0px;
    font-size: 0px;
    background: rgba(255, 255, 255, 0.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='icon icon-tabler icon-tabler-search' width='14' height='14' viewBox='0 0 24 24' stroke-width='2' stroke='%23ffffff' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0' /%3E%3Cpath d='M21 21l-6 -6' /%3E%3C/svg%3E") center center no-repeat;
    cursor: pointer;
    width: 25px;
    height: 25px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    -webkit-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.menu-right .search-button:hover {
    transform: scale(1.2);
}

.menu-right .search-button:active {
    transform: scale(0.95) !important;
}

.menu-right .search-button i {
    pointer-events: none !important;
}

/* Vyhledávací overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
}

.search-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.search-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.search-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--ramecek);
    position: relative;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 25px;
}

.search-overlay .search-container .search-input {
    width: 100% !important;
    max-width: none !important;
    padding: 15px 20px 15px 20px !important;
    font-size: 18px !important;
    border: 2px solid var(--modra_ramecek) !important;
    border-radius: 8px !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    background: #fafbfc !important;
    box-sizing: border-box !important;
    flex: 1 !important;
}

.search-overlay .search-container .search-input:focus,
.search-overlay .search-container .search-input:active {
    border-color: var(--zbarva) !important;
    box-shadow: 0 0 0 3px rgba(var(--zbarva), 0.1) !important;
    background: white !important;
}

.search-icon {
    position: absolute;
    right: 15px;
    color: var(--placeholder);
    font-size: 20px;
    pointer-events: none;
}

.search-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    font-size: 24px;
    color: var(--placeholder);
    cursor: pointer;
    padding: 0px;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 30px;
    width: 30px;
    height: 30px;
}

.search-close:hover {
    background: var(--sediva_pozadi);
    color: var(--text);
}

.search-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.search-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.search-result-item {
    padding: 15px 25px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.search-result-item:hover,
.search-result-item.active {
    background: #f8f9fc;
    border-left: 3px solid var(--modra_hlavni);
    padding-left: 22px;
}

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

.search-result-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--bold);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-result-type {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.search-result-type.page {
    background: var(--modra_pozadi);
    color: var(--modra_hlavni);
}

.search-result-type.content {
    background: var(--zelena_pozadi);
    color: var(--zelena_hlavni);
}

.search-result-type.custom {
    background: var(--zluta_pozadi);
    color: var(--zluta_hlavni);
}

.search-result-description {
    font-size: 14px;
    color: var(--placeholder);
    line-height: 1.4;
}

.search-result-description mark {
    background: rgba(255, 235, 59, 0.6);
    padding: 1px 2px;
    border-radius: 2px;
    color: inherit;
    font-weight: 600;
}

.search-no-results {
    padding: 40px 25px;
    text-align: center;
    color: var(--placeholder);
}

.search-no-results .icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.search-loading {
    padding: 40px 25px;
    text-align: center;
    color: var(--placeholder);
}

.search-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--modra_hlavni);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.search-hint {
    padding: 15px 25px;
    background: #f8f9fc;
    border-top: 1px solid var(--ramecek);
    font-size: 13px;
    color: var(--placeholder);
    text-align: center;
}

.search-stats {
    padding: 10px 25px;
    background: #f8f9fc;
    border-bottom: 1px solid var(--ramecek);
    font-size: 13px;
    color: var(--placeholder);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobilní optimalizace */
@media (max-width: 768px) {
    .search-overlay {
        padding-top: 5vh;
    }

    .search-container {
        width: 95%;
        max-height: 85vh;
    }

    .search-header {
        padding: 15px 20px;
    }

    .search-input {
        font-size: 16px;
        padding: 12px 45px 12px 15px;
    }

    .search-result-item {
        padding: 12px 20px;
    }

    .search-result-title {
        font-size: 15px;
    }

    .search-result-description {
        font-size: 13px;
    }
}

/* Animace pro výsledky */
.search-result-item {
    animation: slideInResult 0.3s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

.search-result-item:nth-child(1) {
    animation-delay: 0.05s;
}

.search-result-item:nth-child(2) {
    animation-delay: 0.1s;
}

.search-result-item:nth-child(3) {
    animation-delay: 0.15s;
}

.search-result-item:nth-child(4) {
    animation-delay: 0.2s;
}

.search-result-item:nth-child(5) {
    animation-delay: 0.25s;
}

@keyframes slideInResult {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}