/* =============================================================================
   GreenIdea — custom overrides (revelor-additional.css)
   Pouze styly, které NEJSOU v revelor.css
   ============================================================================= */

/* Banner v overlay */
.search-overlay__banner {
    margin: 20px 20px 0;
    padding: 12px;

    background-color: #f1f1f1;
    border-radius: 16px;
    text-align: center;
}

@media (max-width: 499px) {
    .search-overlay__banner {
        margin-inline: 0;

        border-radius: 0;
    }
}

.search-overlay__banner-countdown {
    margin-inline: -12px;
    margin-bottom: -12px;
    padding: 8px 12px;

    border-radius: 0 0 16px 16px;
    background-color: #ff1694;
    color: #fff;
    font-size: 14px;
}

@media (max-width: 499px) {
    .search-overlay__banner-countdown {
        border-radius: 0;
    }
}

.search-overlay__banner-label {
    font-weight: 700;
}

.search-overlay__banner-timer {
    display: flex;
    justify-content: center;
    gap: 12px;

    margin-top: 4px;
}

.search-overlay__banner-unit {
    display: flex;
    flex-direction: column;

    line-height: 1.2;
}

.search-overlay__banner-value {
    font-weight: 700;
}

.search-overlay__banner-unit-label {
    font-size: 10px;
}

/* Banner na search results page */
.search-results-banner {
    padding: 20px;
    margin-block: 24px;

    background-color: #f1f1f1;
    border-radius: 16px;
    text-align: center;
}

.search-results-banner__countdown {
    margin: 12px -20px -20px;
    padding: 12px 20px;

    background-color: #ff1694;
    border-radius: 0 0 16px 16px;
    color: #fff;
}

.search-results-banner__label {
    font-weight: 700;
}

.search-results-banner__timer {
    display: flex;
    justify-content: center;
    gap: 20px;

    margin-top: 12px;
}

.search-results-banner__unit {
    display: flex;
    flex-direction: column;

    line-height: 1.2;
}

.search-results-banner__value {
    font-weight: 700;
    font-size: 20px;
}

.search-results-banner__unit-label {
    font-size: 12px;
}

/* Product appendix */
.search-overlay__product-title .product-appendix {
    color: #000;
    font-size: 14px;
    font-weight: 700;
}

/* Hide default products heading */
#products-found .search-products-heading {
    display: none;
}

/* GreenIdea header — whisperer override */
#header .searchWhisperer.active {
    display: none;
}

#header #formSearchForm {
    cursor: pointer;

    border: 1px solid #000;
}

#header #formSearchForm input {
    pointer-events: none;

    color: transparent;
    font-size: 16px;
}

/* Custom search icon (GreenIdea SVG) */
.search-overlay__submit {
    mask-image: url("https://www.greenidea.cz/user/documents/upload/kodovani/magnifier.svg");
    mask-repeat: no-repeat;
    mask-size: 20px;
    mask-position: 10px center;
    -webkit-mask-image: url("https://www.greenidea.cz/user/documents/upload/kodovani/magnifier.svg");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 20px;
    -webkit-mask-position: 10px center;
    background-color: #000;
}

.search-overlay__submit:hover {
    background-color: var(--color-primary);
}

/* Product image overflow fix */
.product-image-container .image {
    overflow: hidden;
    text-decoration: none !important;
}

.product-image-container .image:hover {
    text-decoration: none !important;
}

/* Quick add button — results page positioning */
.p:hover .quick-add-btn {
    transform: translateY(0);
}

.quick-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    position: absolute;
    left: 0;
    bottom: 0;

    transform: translateY(100%);

    background-color: #19a950 !important;
    border: none !important;
    transition: transform ease 300ms, background-color ease 300ms;
}

.quick-add-btn:hover {
    background-color: var(--color-secondary-hover) !important;
    color: #fff !important;
}

.quick-add-btn.success {
    background-color: #10b981 !important;
}

.quick-add-btn .spinner-small {
    display: inline-block;

    font-size: 14px;
}

/* GreenIdea search results page — layout overrides */
.id--11.revelor-ready .breadcrumbs {
    display: none;
}

.id--11.revelor-ready .dkLabVisitedProductsNew {
    display: none;
}

.id--11.revelor-ready .container {
    min-width: 90rem;
    max-width: 100rem;
}

@media (max-width: 1440px) {
    .id--11.revelor-ready .container {
        min-width: unset;
        max-width: 75rem;
    }
}

@media (max-width: 1024px) {
    .id--11.revelor-ready .container {
        min-width: 100%;
    }
}

/* Search results header — border-radius override */
.search-results-header {
    border-radius: 20px;
}

@media (max-width: 767px) {
    .search-results-header {
        border-radius: 10px;
    }
}

/* Custom checkbox filter (GreenIdea design) */
.search-filter-checkbox {
    position: relative;

    padding-left: 24px;
}

.search-filter-checkbox input[type="checkbox"] {
    display: none;

    position: relative;
    width: 0;
    height: 0;

    opacity: 0;
    cursor: pointer;
}

.search-filter-checkbox::before {
    display: inline-block;

    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;

    border: 1px solid var(--color-primary);
    border-radius: 3px;
    background-color: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-filter-checkbox::after {
    content: "";

    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;

    opacity: 0;
    background-color: var(--color-primary);
    border-radius: 2px;
}

.search-filter-checkbox:has(input[type="checkbox"]:checked)::after {
    opacity: 1;
}

.search-filter-checkbox:hover {
    color: var(--color-primary);
}

.search-filter-checkbox input[type="checkbox"]:focus::before {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Search results sections spacing */
.id--11 > section,
#products-found > section {
    margin-block: 60px;
}

@media (max-width: 767px) {
    .id--11 > section,
    #products-found > section {
        margin-block: 40px;
    }
}

.id--11 > section:last-child,
#products-found > section:last-child {
    margin-bottom: 0;
}

.id--11 .search-results-load-more,
#products-found .search-results-load-more {
    text-align: center;
}

/* Articles horizontal scroll on mobile */
.id--11 #newsWrapper,
#products-found #newsWrapper {
    margin-top: 0;
}

@media (max-width: 767px) {
    .id--11 #newsWrapper,
    #products-found #newsWrapper {
        flex-wrap: nowrap;
        gap: 15px;

        margin-inline: -10px;
        padding-inline: 10px;
        width: calc(100% + 20px);

        overflow: auto;
        scrollbar-width: none;
    }

    .id--11 #newsWrapper::-webkit-scrollbar,
    #products-found #newsWrapper::-webkit-scrollbar {
        display: none;
    }

    .id--11 #newsWrapper .news-item,
    #products-found #newsWrapper .news-item {
        flex-shrink: 0;

        max-width: 90%;
        width: 250px;
    }
}

/* Expand buttons */
.id--11 .articles-expand-btn,
.id--11 .subcategories-expand-btn,
#products-found .articles-expand-btn,
#products-found .subcategories-expand-btn {
    display: none;
}

@media (min-width: 768px) {
    .id--11 .articles-wrapper,
    #products-found .articles-wrapper {
        position: relative;

        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .id--11 .articles-wrapper[data-collapsed="true"],
    #products-found .articles-wrapper[data-collapsed="true"] {
        max-height: 400px;
    }

    .id--11 .articles-wrapper[data-collapsed="true"]::after,
    #products-found .articles-wrapper[data-collapsed="true"]::after {
        content: "";

        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;

        background: linear-gradient(180deg, rgba(255, 255, 255, 0.00) 8.17%, rgba(255, 255, 255, 0.75) 40.4%, #FFF 66.89%, #FFF 100%);
        z-index: 1;
    }

    .id--11 .articles-wrapper[data-collapsed="false"],
    #products-found .articles-wrapper[data-collapsed="false"] {
        max-height: none;
    }

    .id--11 .articles-expand-btn,
    .id--11 .subcategories-expand-btn,
    #products-found .articles-expand-btn,
    #products-found .subcategories-expand-btn {
        display: block;

        margin-top: 20px;
        margin-left: auto;
        margin-right: auto;
    }
}

.id--11 .search-results-section,
#products-found .search-results-section {
    margin-bottom: 30px;
}

.id--11 .search-results-section:last-child,
#products-found .search-results-section:last-child {
    margin-bottom: 0;
}
