/* Resetowanie niechcianych stylów */
body > div.text-center:not(.container),
body > div.text-center + script,
body > div.text-center + script + script {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    z-index: -9999 !important;
}

/* Ukrycie stylów wstawianych przez skrypty */
style:contains('.container, .row, .col-md-*'),
style:contains('search-suggestions'),
style:contains('language-flag') {
    display: none !important;
}

/* Style dla wyszukiwarki */
.search-suggestions {
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 0.25rem;
    display: none;
}

.search-suggestions.show {
    display: block;
}

.search-suggestions .suggestion-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--bs-body-color);
    transition: background-color 0.2s, color 0.2s;
    border-bottom: 1px solid var(--bs-border-color);
}

.search-suggestions .suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestions .suggestion-item:hover,
.search-suggestions .suggestion-item.highlighted {
    background-color: var(--bs-primary);
    color: white;
}

.search-suggestions .suggestion-category {
    font-size: 0.8rem;
    color: var(--bs-secondary);
    margin-top: 0.25rem;
    opacity: 0.8;
}

.search-suggestions .suggestion-item:hover .suggestion-category,
.search-suggestions .suggestion-item.highlighted .suggestion-category {
    color: rgba(255, 255, 255, 0.8);
}

/* Style dla flag językowych */
.language-flags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.language-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    cursor: pointer;
}

.language-flag:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-flag.active-flag {
    border-color: var(--bs-primary);
    background-color: rgba(13, 110, 253, 0.1);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.flag-icon {
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

/* Style dla ciemnego motywu */
[data-theme="dark-transparent"] .language-flag:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark-transparent"] .language-flag.active-flag {
    background-color: rgba(13, 110, 253, 0.25);
}

/* Ukrycie elementów tłumacza Google */
#google_translate_element,
.goog-te-banner-frame,
.goog-te-menu-value,
.goog-te-ftab,
.goog-te-gadget,
.goog-te-combo,
.goog-te-gadget-simple,
.skiptranslate {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    z-index: -9999 !important;
}

/* Naprawa pozycjonowania elementów */
.container, .row, .col-md-* {
    position: static !important;
}

/* Naprawa wyglądu strony po ukryciu elementów */
body {
    overflow-x: hidden;
}

/* Dodatkowe style dla responsywności */
@media (max-width: 768px) {
    .search-suggestions {
        max-height: 60vh;
    }
}
