﻿body {
}

.supplier-connect {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.supplier-connect__filters {
    margin-bottom: 20px;
}

.supplier-connect__search {
    margin-bottom: 15px;
}

    .supplier-connect__search input {
        width: 100%;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

.supplier-item {
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
}

.supplier-item__name {
    margin: 0 0 10px 0;
}

.supplier-item__website {
    text-decoration: none;
    font-weight: 700;
    font-size: 23px;
}

    .supplier-item__website:hover {
        text-decoration: underline;
    }

.results-count {
    margin-bottom: 15px;
}

.supplier-connect__search {
    flex: auto;
    width: auto;
}

select#search-field {
    width: 10%;
}

.supplier-connect__search-field.row {
    margin: auto;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
}

.filter-list {
    display: block;
    max-width: none;
}

.filters {
    border-radius: 8px;
}

.section-heading {
    margin-bottom: 10px;
}

/* Media Query for adjusting the layout on smaller screens */
@media (max-width: 1200px) {
    .grid {
        grid-template-columns: 1fr 2fr; /* Make the filter and content more balanced on smaller screens */
    }
}

@media (max-width: 992px) {
    .grid {
        grid-template-columns: 1fr; /* Stacks the columns for smaller screens */
    }

    .filters {
        order: 1; /* Ensures filter appears above */
    }

    .supplier-list {
        order: 2; /* Ensures catalog list appears below filters */
    }
}

/* Sticky filter only for larger screens */
@media (min-width: 992px) {
    .filters {
        border-radius: 8px;
        position: -webkit-sticky; /* For Safari */
        position: sticky;
        top: 20px; /* Adjusts the distance from the top of the viewport */
    }
}

.filter-wrapper {
    display: block;
    max-width: 287px;
}

.filters h5 {
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

#searchBox {
    margin-bottom: 20px;
}

.catalog-content {
    display: flex;
    flex-direction: column;
}

.aiag-pagination-wrapper {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 2;
    padding: 10px 0;
    margin-bottom: 20px;
}

.supplier-connect__content {
    display: flex;
    flex-direction: column;
}

.supplier-list {
    padding-top: 20px;
}

.result {
    display: block;
}

.tag.tag--format {
    margin-right: 16px;
    margin-bottom: 16px;
}

@media (max-width: 992px) {
    .aiag-pagination-wrapper {
        top: 0;
    }
}

@media (min-width: 768px) {
    .supplier-connect {
        padding: 0 10px;
    }
    .filter-wrapper {
        max-width: unset;
    }
}
