/**
 * SX1 Custom Search Styles
 * Shortcodes: [sx1_searchform], [sx1_resultgrid]
 */

/*
====== SEARCH FORM ======
*/
.sx1-search-form-wrapper {
    max-width: 600px;
    margin: 2px auto;
    padding: 0;
}

.sx1-search-form {
    width: 100%;
}

.sx1-search-input-wrapper {
    display: flex;
    align-items: stretch;
    background-color: #ffffff;
    border: 1px solid #01a850;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(1, 168, 80, 0.1);
    transition: all 0.3s ease;
}

.sx1-search-input-wrapper:focus-within {
    box-shadow: 0 4px 12px rgba(1, 168, 80, 0.2);
}

.sx1-search-field {
    flex: 1;
    border: none;
    padding: 0px 15px;
    font-size: 16px;
    color: #333333;
    outline: none;
    background-color: transparent;
}

.sx1-search-field::placeholder {
    color: #999999;
}

.sx1-search-submit {
    border: none;
    background-color: #01a850;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sx1-search-submit:hover {
    background-color: #018a42;
}

.sx1-search-submit:active {
    background-color: #016f35;
}

.sx1-search-icon {
    width: 24px;
    height: 24px;
    display: block;
    stroke: #ffffff;
}

.sx1-search-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/*
====== SEARCH RESULTS ======
*/
.sx1-search-results {
    margin: 40px auto;
    width: 100%;
    max-width: 1480px;
    padding: 0 20px;
}

/* Section Titles */
.sx1-search-section {
    margin-bottom: 50px;
}

.sx1-search-section-title {
    font-size: 32px;
    font-weight: 300;
    color: #01a850;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #01a850;
    text-align: left;
}

/* No Results Message */
.sx1-no-results {
    text-align: center;
    padding: 40px 20px;
}

.sx1-no-results-message {
    font-size: 20px;
    color: #666666;
    margin-bottom: 30px;
}

.sx1-no-results-message strong {
    color: #01a850;
}

/* Use shared grid from browser */
.sx1-search-results .sx1-browser-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/*
====== PAGE CARD SPECIFIC STYLES ======
*/
.sx1-page-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.sx1-page-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Page card has no image, so info takes full height */
.sx1-page-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sx1-page-excerpt {
    /* Longer text space since no image */
    min-height: 150px;
    max-height: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Page Link Button */
.sx1-page-link-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background-color: #01a850;
    color: #ffffff !important;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.sx1-page-link-btn:hover {
    background-color: #018a42;
    color: #ffffff !important;
}

.sx1-page-link-btn:active {
    background-color: #016f35;
}

/*
====== RESPONSIVE DESIGN ======
*/

/* Large Tablet/Small Desktop (1200px - 1479px) */
@media screen and (max-width: 1479px) {
    .sx1-search-results {
        max-width: 100%;
    }
}

/* Tablet Large (900px - 1199px) - Grid goes to 2 columns */
@media screen and (max-width: 1199px) {
    .sx1-search-results .sx1-browser-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .sx1-search-section-title {
        font-size: 28px;
    }
}

/* Tablet (768px - 980px) */
@media screen and (max-width: 980px) {
    .sx1-search-form-wrapper {
        max-width: 100%;
        margin: 15px auto;
    }

    .sx1-search-results {
        padding: 0 15px;
    }
    
    .sx1-search-results .sx1-browser-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .sx1-search-section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
}

/* Mobile (under 768px) - Grid goes to 1 column */
@media screen and (max-width: 767px) {
    .sx1-search-field {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .sx1-search-submit {
        padding: 10px 15px;
    }
    
    .sx1-search-icon {
        width: 20px;
        height: 20px;
    }
    
    .sx1-search-results {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .sx1-search-results .sx1-browser-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sx1-search-section-title {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .sx1-no-results {
        padding: 30px 15px;
    }
    
    .sx1-no-results-message {
        font-size: 18px;
        margin-bottom: 20px;
    }
}

/* Small Mobile (under 480px) */
@media screen and (max-width: 479px) {
    .sx1-search-section-title {
        font-size: 20px;
    }
    
    .sx1-no-results-message {
        font-size: 16px;
    }
}

