.foreto-search-results {
    width: 100%;
}

.foreto-search-results__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px;
}

.foreto-search-results__title {
    color: #121563;
    font-family: Nunito;
    font-size: 2rem;
    font-style: normal;
    font-weight: 700;
    line-height: 2.375rem;
    margin: 0;
    margin-bottom: 32px;
}

.foreto-search-results__count {
    color: #121563;
    font-family: Nunito;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5rem;
    margin-bottom: 32px;
}

.foreto-search-results__list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
}

.foreto-search-results__list.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.foreto-search-results__list.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #EB660A;
    border-top-color: transparent;
    border-radius: 50%;
    z-index: 2;
    animation: foreto-spinner 0.8s linear infinite;
}

@keyframes foreto-spinner {
    to {
        transform: rotate(360deg);
    }
}

.foreto-search-results__item {
    display: grid;
    grid-template-columns: 300px 1fr;
    background: #F8FAFB;
    border: 1px solid #F5F5FB;
    text-decoration: none;
    color: inherit;
}

.foreto-search-results__thumbnail {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.foreto-search-results__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 26px;
    border-bottom-left-radius: 26px;
}

.foreto-search-results__content {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.foreto-search-results__meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 9px;
}

.foreto-search-results__post-title {
    font-family: Nunito;
    font-size: 2rem;
    font-weight: 700;
    line-height: 2.375rem;
    color: #121563;
    margin: 0;
    margin-bottom: 9px;
    display: flex;
    gap: 8px;
    position: relative;
    padding-right: 48px;
}

.foreto-search-results__arrow-wrapper {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
}

.foreto-search-results__arrow-icon {
    width: 20px;
    height: 20px;
}

.foreto-search-results__date {
    color: #55565A;
    font-family: Nunito;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 500;
    line-height: 1.125rem;
}

.foreto-search-results__author {
    color: #EB660A;
    font-family: Nunito;
    font-size: 1rem;
    font-style: normal;
    font-weight: 600;
    line-height: 1.25rem;
}

.foreto-search-results__excerpt {
    overflow: hidden;
    color: #55565A;
    text-overflow: ellipsis;
    font-family: Nunito;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5rem;
}

.foreto-search-results__pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.foreto-search-results__pagination .page-numbers {
    display: flex;
    width: 36px;
    height: 36px;
    padding: 8px 12px;
    justify-content: center;
    align-items: center;
    gap: 4px;
    font-family: Nunito;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.125rem;
    color: #121563;
    text-decoration: none;
}

.foreto-search-results__pagination .current {
    border-radius: 8px;
    background: #EB660A;
    color: #FFF;
}

.foreto-search-results__pagination .page-numbers:hover:not(.current, .dots) {
    border-radius: 8px;
    background: #EBEBEC;
    color: #121563;
}

.foreto-search-results__pagination .prev,
.foreto-search-results__pagination .next {
    width: auto;
}

.foreto-search-results__pagination .chevron {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #121563;
    stroke-width: 2;
}

/* PC styles */
@media (min-width: 769px) {
    .foreto-search-results__item {
        border-radius: 26px;
        min-height: 230px;
    }

    .foreto-search-results__date {
        order: -1;
        margin-bottom: 16px;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .foreto-search-results__title {
        font-size: 1.5rem;
        line-height: 1.875rem;
        margin-bottom: 16px;
    }

    .foreto-search-results__count {
        font-size: 0.875rem;
        line-height: 1.25rem;
        margin-bottom: 16px;
    }

    .foreto-search-results__item {
        grid-template-columns: 60px 1fr;
        gap: 8px;
        padding: 4px;
        border-radius: 6px;
        min-height: 68px;
    }

    .foreto-search-results__thumbnail {
        height: 60px;
        width: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: center;
    }

    .foreto-search-results__thumbnail img {
        border-radius: 6px;
        background-color: lightgray;
        background-position: center;
        background-repeat: no-repeat;
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    .foreto-search-results__content {
        gap: 4px;
        padding: 0;
        min-height: 60px;
        justify-content: center;
    }

    .foreto-search-results__meta {
        gap: 4px;
        margin-bottom: 0;
    }

    .foreto-search-results__post-title {
        font-size: 0.875rem;
        line-height: 1.125rem;
        margin-bottom: 4px;
        padding-right: 32px;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .foreto-search-results__excerpt {
        display: none;
    }

    .foreto-search-results__author {
        display: none;
    }

    .foreto-search-results__arrow-wrapper {
        width: 24px;
        height: 24px;
    }

    .foreto-search-results__arrow-icon {
        width: 16px;
        height: 16px;
    }

    .foreto-search-results__date {
        font-size: 0.75rem;
        font-weight: 400;
        line-height: 1.125rem;
    }
} 

/* Podczas ładowania wyłączamy interakcje z listą */
.foreto-search-results__list.loading .foreto-search-results__item {
    pointer-events: none;
} 

.foreto-search-results__search-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.foreto-search-results__search-form {
    width: 100%;
    max-width: 600px;
}

.foreto-search-results__search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.foreto-search-results__search-icon {
    position: absolute;
    left: 8px;
    display: flex;
    width: 32px;
    height: 32px;
    padding: 8px;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.foreto-search-results__search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid #35387F;
    border-radius: 40px;
    background: #FFF;
    color: #121563;
    font-family: Nunito;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5rem;
    box-sizing: border-box;
}

.foreto-search-results__search-input::placeholder {
    color: #55565A;
}

.foreto-search-results__search-input:focus {
    outline: none;
    border: 1px dotted red;
}

/* Mobile styles */
@media (max-width: 768px) {
    .foreto-search-results__search-wrapper {
        margin-bottom: 24px;
        background: #F8FAFB;
        padding: 16px;
        margin: -16px -32px 24px -32px;
    }
    
    .foreto-search-results__search-form {
        padding: 0;
    }

    .foreto-search-results__title {
        font-size: 1.125rem;
        line-height: 1.625rem;
        font-weight: 700;
        margin-bottom: 16px;
    }

    .foreto-search-results__count {
        display: none;
    }
} 

.foreto-search-results__search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    border-radius: 16px;
    border: 1px solid #F8FAFB;
    background: #FFF;
    box-shadow: 0px 2px 16px 0px rgba(195, 210, 219, 0.25);
    z-index: 10;
    display: none;
    overflow: hidden;
}

.foreto-search-results__search-suggestions.active {
    display: block;
}

.foreto-search-results__suggestion-item {
    display: flex;
    height: 40px;
    padding: 8px 16px;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: Nunito;
    font-size: 1rem;
    font-style: normal;
    font-weight: 600;
    line-height: 1.25rem;
    color: #121563;
    cursor: pointer;
}

.foreto-search-results__suggestion-item:first-child {
    border-bottom: 1px solid #F8FAFB;
}

.foreto-search-results__suggestion-item:hover {
    background: #F8FAFB;
}

.foreto-search-results__suggestion-highlight {
    color: #EB660A;
    font-weight: 600;
} 