/**
 * Live Search - Enhanced Responsive Styles
 * Version: 1.1.0
 */

/* Container Styles */
.akron-live-search {
    /* padding: 15px 0;
    margin-bottom: 30px; */
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Header Section */
.akron-live-search-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 70px;
}

/* Inline terms styles */
.akron-live-search-terms-inline {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 0 55px;
    margin-bottom: 0px;
}

.akron-live-search-terms-inline .term-item {
    padding: 0 8px 8px 8px;
    color: var(--e-global-color-b2f281e);
    cursor: pointer;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    position: relative;
    font-family: "owners", Sans-serif;
    font-weight: 500;
    font-size: 24px;
    line-height: 26px;
    letter-spacing: 0%;
    margin: 0;

}

.akron-live-search-terms-inline .term-item::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #304944;
    opacity: .8;
    -webkit-transform: scaleX(0);
    -ms-transform: scaleX(0);
    transform: scaleX(0);
    -webkit-transform-origin: bottom right;
    -ms-transform-origin: bottom right;
    transform-origin: bottom right;
    -webkit-transition: -webkit-transform .3s;
    transition: -webkit-transform .3s;
    -o-transition: transform .3s;
    transition: transform .3s;
    transition: transform .3s, -webkit-transform .3s;
}

.akron-live-search-terms-inline .term-item:hover::after,
.term-item.active::after {
    -webkit-transform-origin: bottom left;
    -ms-transform-origin: bottom left;
    transform-origin: bottom left;
    -webkit-transform: scaleX(1);
    -ms-transform: scaleX(1);
    transform: scaleX(1);
}

.akron-live-search-search-box {
    width: 100%;
    position: relative;
}

.akron-live-search-search-box .akron-live-search-search-input {
    width: 100%;
    padding: 7px 22px;
    border: 1px solid var(--e-global-color-8e134f3);
    border-radius: 5px;
    height: 42px;
    -webkit-appearance: none;
    appearance: none;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background: transparent;
    font-size: 20px;
    line-height: 28px;
}

.akron-live-search-search-box .akron-live-search-search-input:focus {
    border-color: var(--e-global-color-8e134f3);
}

.akron-live-search-search-box .akron-live-search-search-input:focus-visible {
    border-color: var(--e-global-color-8e134f3);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.akron-live-search-search-box .ekit_search-button {
    background-color: transparent;
    border: 0;
    padding: 0;
    color: #fff;
    position: absolute;
    right: 0;
    cursor: pointer;
    top: 55%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    height: 100%;
    width: 70px;
    border-radius: 0 50px 50px 0;
}

.akron-live-search-search-box .ekit_search-button:hover,
.akron-live-search-search-box .ekit_search-button:focus {
    background: transparent;
    border: none;
}

.akron-live-search-search-box .ekit_search-button svg {
    width: 22px;
}

.akron-live-search-search-box .akron-live-search-search-input::placeholder {
    font-weight: 400;
    font-family: "owners", Sans-serif;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: 0%;
    color: var(--e-global-color-c23351c);

}

.read-more-container .read-more-link svg {
    width: 18px;
    font-size: 15px;
    margin-left: 10px;
    margin-top: 0;
    -webkit-transition: .3s ease-in-out;
    -o-transition: .3s ease-in-out;
    transition: all .3s ease-in-out;
    height: 0.9em;
}

/* Results Section */
.akron-live-search-results {
    position: relative;
    min-height: 200px;
}

.akron-live-search-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(246, 244, 242, 0.7);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    z-index: 10;
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    display: none;
}

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

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

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

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

/* 
 * Grid Layout for Posts - Mobile First
 * Fallback for browsers that don't support grid
 */
.akron-live-search-posts {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin: -10px;
}

@supports (display: grid) {
    .akron-live-search-posts {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
        margin: 0;
    }
}

/* Post Item Styles */
.akron-live-search-post {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 calc(100% - 20px);
    flex: 0 0 calc(100% - 20px);
    margin: 10px;
    overflow: hidden;
    -webkit-transition: -webkit-transform 0.2s ease, -webkit-box-shadow 0.2s ease;
    transition: -webkit-transform 0.2s ease, -webkit-box-shadow 0.2s ease;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    transition: transform 0.2s ease, box-shadow 0.2s ease, -webkit-transform 0.2s ease, -webkit-box-shadow 0.2s ease;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}

@supports (display: grid) {
    .akron-live-search-post {
        -webkit-box-flex: 1;
        -ms-flex: auto;
        flex: auto;
        margin: 0;
    }
}


.post-thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 200px;
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    position: relative;
}

.post-thumbnail-wrapper .post-thumbnail img {
    width: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    font-family: 'object-fit: cover;';
    /* IE polyfill */
    height: 220px !important;
    object-position: center center;
    border-radius: 15px;
}

.no-image-placeholder {
    background-color: var(--e-global-color-d50e4d1);
    width: 100%;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.no-image-placeholder:after {
    content: "No Image";
    color: var(--e-global-color-b2f281e);
}

.akron-live-search h4.category-label {
    color: var(--e-global-color-b2f281e);
    padding: 19px 0px 6px;
    margin: 0;
    font-size: 24px;
    line-height: 26px;

}

.akron-live-search-post h3 {
    margin: 10px 0px 18px;
    font-size: 20px;
    font-weight: 500;
    color: #000;
}

.akron-live-search-post h3 a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
}

.akron-live-search-post h3 a:hover {
    color: #000 !important;
}

.read-more-container {
    margin: 0 0px 15px;
    margin-top: auto;
}

.read-more-link {
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    text-decoration: none;
    border-bottom: 2px solid var(--e-global-color-0c74ad5);
    -webkit-transition: background-color 0.2s ease;
    transition: background-color 0.2s ease;
    padding: 0 8px 8px 8px;
}

.read-more-container .read-more-link:hover svg {
    margin-left: 15px;
}

.read-more-link svg path {
    fill: var(--e-global-color-0c74ad5);

}

.read-more-link:hover {
    border-bottom: 2px solid var(--e-global-color-text);

}

.read-more-link:hover svg path {
    fill: var(--e-global-color-text);

}

.no-results {
    padding: 30px;
    text-align: center;
    font-size: 16px;
    color: #666;
    background-color: #f9f9f9;
    border-radius: 4px;
    width: 100%;
}

@supports (display: grid) {
    .no-results {
        grid-column: 1 / -1;
    }
}

/* Pagination Styles */
.akron-live-search-pagination {
    /* margin-top: 30px; */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.akron-live-search-pagination-inner {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 15px;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.pagination-number,
.pagination-prev,
.pagination-next {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
    text-align: center;
    border-radius: 4px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.akron-live-search-pagination-inner .pagination-number {
    min-width: 45px;
    height: 45px;
    border-radius: 100px;
    border: none;
}

.pagination-number:hover,
.pagination-prev:hover,
.pagination-next:hover {
    background-color: #e0e0e0;
}

.pagination-number.active {
    background-color: #0073aa;
    color: white;
    font-weight: 600;
}

.pagination-prev.disabled,
.pagination-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-dots {
    padding: 0 5px;
    color: #666;
}

.akron-live-search-pagination-inner .pagination-prev:hover,
.akron-live-search-pagination-inner .pagination-next:hover {
    background: transparent !important;
}

/* Elementor Editor Preview Loading Styles */
.elementor-editor-preview-loading {
    background-color: #fff;
    padding: 30px;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.elementor-loader-wrapper {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.elementor-loader {
    height: 50px;
    width: 50px;
    position: relative;
    transform: translateY(-50%);
    top: 50%;
    margin: 0 auto;
}

.elementor-loading-title {
    color: #666;
    text-align: center;
    font-size: 14px;
    font-weight: normal;
    margin-top: 15px;
}

.elementor-loader-box {
    background-color: #0073aa;
    width: 25%;
    height: 25%;
    position: absolute;
    animation: elementor-animation-loader 1.5s linear infinite;
}

.elementor-loader-box:nth-of-type(1) {
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.elementor-loader-box:nth-of-type(2) {
    top: 0;
    right: 0;
    animation-delay: -.375s;
}

.elementor-loader-box:nth-of-type(3) {
    bottom: 0;
    right: 0;
    animation-delay: -.75s;
}

.elementor-loader-box:nth-of-type(4) {
    bottom: 0;
    left: 0;
    animation-delay: -1.125s;
}

@keyframes elementor-animation-loader {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(.5);
    }

    50% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

/* Error message styling */
.akron-live-search-preview-error {
    padding: 20px;
    text-align: center;
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.akron-live-search-preview-error p {
    margin-bottom: 15px;
    color: #666;
}

.akron-live-search-preview-retry-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.akron-live-search-preview-retry-btn:hover {
    background-color: #005d8c;
}


/* Small Tablets (portrait) */
@media (min-width: 576px) {
    .akron-live-search-posts {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }

    .akron-live-search-post {
        -webkit-box-flex: 0;
        -ms-flex: 0 0 calc(50% - 20px);
        flex: 0 0 calc(50% - 20px);
    }

    @supports (display: grid) {
        .akron-live-search-posts {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
        }

        .akron-live-search-post {
            -webkit-box-flex: 1;
            -ms-flex: auto;
            flex: auto;
        }
    }

    .pagination-number,
    .pagination-prev,
    .pagination-next {
        min-width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

/* Tablets and small desktops */
@media (min-width: 768px) {
    .akron-live-search-header {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
    }

    .akron-live-search-terms-filter {
        -webkit-box-flex: 2;
        -ms-flex: 2;
        flex: 2;
    }

    .akron-live-search-search-box {
        -webkit-box-flex: 1;
        -ms-flex: 1;
        flex: 1;
        position: relative;
        max-width: 350px;
    }

    .pagination-number,
    .pagination-prev,
    .pagination-next {
        min-width: 36px;
        height: 36px;
    }

    .akron-live-search-pagination-inner .pagination-number {
        min-width: 45px;
        height: 45px;
        border-radius: 100px;
    }

}

/* Desktops */
@media (min-width: 992px) {
    .akron-live-search-post {
        -webkit-box-flex: 0;
        -ms-flex: 0 0 calc(33.333% - 20px);
        flex: 0 0 calc(33.333% - 20px);
    }

    @supports (display: grid) {
        .akron-live-search-posts {
            grid-template-columns: repeat(3, 1fr);
        }
    }
}

/* Large Desktops */
@media (min-width: 1200px) {
    @supports (display: grid) {
        .akron-live-search-posts {
            grid-template-columns: repeat(4, 1fr);
        }
    }
}

/* Print styles */
@media print {

    .akron-live-search-header,
    .akron-live-search-pagination,
    .read-more-link {
        display: none !important;
    }

    .akron-live-search-post {
        page-break-inside: avoid;
        break-inside: avoid;
        -webkit-box-shadow: none !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Horizontal scrolling for taxonomy terms on mobile */

@media (max-width: 1024px) {

    .akron-live-search-terms-inline {
        gap: 0 22px;
    }

    .akron-live-search-terms-inline .term-item {
        font-size: 18px;
    }

}


@media (max-width: 767px) {

    .akron-live-search h4.category-label {
        font-size: 22px;

    }

    .akron-live-search-post h3 {
        margin: 15px 0px 20px;
        font-size: 18px;
    }

    .post-thumbnail-wrapper .post-thumbnail img {
        height: 180px !important;
    }

    .category-label {
        font-size: 16px;
    }

    .akron-live-search-header {
        margin-bottom: 48px;
    }

    .akron-live-search-terms-inline .term-item {
        font-size: 16px;
    }

    .akron-live-search-terms-inline {
        display: flex;
        flex-wrap: wrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Smooth scrolling on iOS */
        scrollbar-width: none;
        /* Hide scrollbar in Firefox */
        -ms-overflow-style: none;
        /* Hide scrollbar in IE/Edge */
        padding-bottom: 10px;
        /* Add space for scrollbar */
        margin-bottom: 5px;
        position: relative;
        gap: 10px;
    }

    /* Hide scrollbar in Chrome/Safari */
    .akron-live-search-terms-inline::-webkit-scrollbar {
        display: none;
    }

    /* Ensure terms don't wrap */
    .term-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* Add subtle indicators that there's more content to scroll */
    .akron-live-search-terms-filter {
        position: relative;
        margin-bottom: 20px;
    }

    .akron-live-search-terms-filter::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        width: 30px;
        pointer-events: none;
        z-index: 1;
    }

    /* Make each term more touch-friendly */
    .term-item {
        padding: 10px 15px;
        min-width: auto;
    }
}