/* Eveal Shortcodes Frontend Styles */

/* Container Styles */
.eveal-load-more-container,
.eveal-ajax-filter-container {
    margin: 2rem auto;
    font-family: monospace;
    transition: 0.45s ease-in-out;
    max-width: min(1236px, 80%);
}

/* Filter Controls */
.eveal-filter-controls {
    padding: 1.5rem;
    border-radius: 0;
    margin: 2rem auto;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
   
    position: relative;
    overflow: hidden;
    row-gap: 24px;
}

.eveal-filter-posts {
    display: flex;
    flex-wrap: wrap;
    row-gap: 30px;
    column-gap: 30px;
}

.eveal-filter-posts article {
    border: 1px solid cornflowerblue;
    padding: 22px;
    width: calc((100% - 60px)/3);
    box-sizing: border-box;
}

.eveal-filter-group {
    display: inline-block;
    margin-right: 1.5rem;
    margin-bottom: 0;
    vertical-align: top;
}

.eveal-filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0;
    color: #333;
    font-size: 0.9rem;
    font-size: 20px;
}

.eveal-filter-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0;
    background: white;
    min-width: 150px;
    font-size: 14px;
}

.eveal-filter-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Checkbox Filter Styles */
.eveal-filter-checkboxes {
    max-width: 100%;
    background: white;
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 12px 0 0;
    z-index: 2;
    position: relative;
}

.eveal-checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    padding: 0.25rem;
    border-radius: 3px;
}

.eveal-filter-controls:after {
    content: '';
    height: 100%;
    width: 100%;
    z-index: -1;
    background: linear-gradient(155deg, black, blue, red, yellow,transparent);
    opacity: 5;
    position: absolute;
    bottom: -30px;
    right: -30px;
    border-radius: 50%;
    opacity: 0.25;
    filter: blur(80px);
    pointer-events: none;
}

 
.eveal-checkbox-item:hover {
    background-color: #f8f9fa;
}

.eveal-checkbox-item:last-child {
    margin-bottom: 0;
}

.eveal-checkbox-item input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
    height: 20px;
    width: 20px;
    vertical-align: middle;
}

.eveal-checkbox-label {
    cursor: pointer;
    user-select: none;
    flex: 1;
    font-size: 18px;
}

.eveal-checkbox-item input[type="checkbox"]:checked {
    background: #007cba;
}

.eveal-checkbox-item input[type="checkbox"]:checked + .eveal-checkbox-label {
    font-weight: 600;
    color: #007cba;
}

.eveal-filter-actions {
    display: inline-block;
    vertical-align: bottom;
    padding-top: 31px;
}

.eveal-filter-btn,
.eveal-reset-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: bold;
    font-family: 'DM Sans';
}

.eveal-filter-btn {
    background: #121a1e;
    color: white;
}

 
.eveal-reset-btn {
    background: #6c757d;
    color: white;
}

.eveal-reset-btn:hover {
    background: #545b62;
}

/* Posts Grid */
.eveal-load-more-posts:has(.eveal-post-item), .eveal-filter-posts:has(.eveal-post-item) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.eveal-load-more-posts  , .eveal-filter-posts .eveal-post-item { }

/* Individual Post Item */
.eveal-post-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}


.eveal-post-content {
    padding: 1.5rem;
}

.eveal-post-thumbnail {
    margin-bottom: 1rem;
}

.eveal-post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.eveal-post-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.eveal-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.eveal-post-title a:hover {
    color: #007cba;
}

.eveal-post-meta {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.eveal-post-date,
.eveal-post-categories {
    display: inline-block;
    margin-right: 1rem;
}

.eveal-post-categories {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    color: #495057;
}

.eveal-post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
    font-size: 1.14rem;
}

/* Load More Button */
.eveal-load-more-button-container {
    text-align: center;
    margin-top: 2rem;
}

.eveal-load-more-btn {
    background: #000;
    color: white;
    border: none;
    padding: 22px;
    border-radius: 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 150px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.eveal-load-more-btn:hover {
   
    transform: translateY(-2px);
}

h2.wp-block-heading {
    padding: 0 22px;
    text-align: center;
    margin: 140px 0 0;
    font-size: 54px;
}

.eveal-load-more-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Loading States */
.eveal-loading {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-style: italic;
}

.eveal-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Posts Message */
.eveal-no-posts {
    text-align: center;
    padding: 18px 22px; width: 100%;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 18px 22px; 
    margin: 0 auto;
    font-size: 40px;
    font-family: 'dashicons';
}

/* Responsive Design */
@media (max-width: 768px) {
    .eveal-filter-group {
        display: block;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .eveal-filter-actions {
        display: block;
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .eveal-load-more-posts,
    .eveal-filter-posts {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .eveal-post-content {
        padding: 1rem;
    }
    
    .eveal-post-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .eveal-filter-controls {
        padding: 1rem;
    }
    
    .eveal-filter-select {
        min-width: 120px;
    }
    
    .eveal-filter-checkboxes {
        max-width: 100%;
        max-height: 150px;
    }
    
    .eveal-load-more-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}


/* Custom scrollbar for filter dropdowns */
.eveal-filter-select {
    scrollbar-width: thin;
    scrollbar-color: #007cba #f1f1f1;
    margin: 8px 0 0;
}

.eveal-filter-select::-webkit-scrollbar {
    width: 8px;
}

.eveal-filter-select::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.eveal-filter-select::-webkit-scrollbar-thumb {
    background: #007cba;
    border-radius: 4px;
}

/* Multi-Select Dropdown Styles */
.filter-multiselect,
select.filter-select[multiple] {
    min-height: 120px;
    padding: 0.5rem;
    border: 2px solid #007cba;
    background: white;
    cursor: pointer;
}

.filter-multiselect option,
select.filter-select[multiple] option {
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 3px;
    margin: 2px 0;
}

.filter-multiselect option:hover,
select.filter-select[multiple] option:hover {
    background-color: #e7f3ff;
}

.filter-multiselect option:checked,
select.filter-select[multiple] option:checked {
    background-color: #007cba;
    color: white;
    font-weight: 600;
}

.filter-multiselect:focus,
select.filter-select[multiple]:focus {
    outline: none;
    border-color: #005a8c;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
}

/* Hide empty filter actions in auto mode */
.craftkit-filter-controls .filter-actions:empty {
    display: none;
}

  
/* High contrast mode support */
@media (prefers-contrast: high) {
    .eveal-post-item {
        border: 2px solid #000;
    }
    
    .eveal-filter-controls {
        border: 2px solid #000;
    }
    
    .eveal-load-more-btn,
    .eveal-filter-btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .eveal-post-item,
    .eveal-load-more-btn,
    .eveal-filter-btn,
    .eveal-reset-btn {
        transition: none;
    }
    
    .eveal-loading::before {
        animation: none;
    }
    
    .eveal-post-item {
        animation: none;
    }
} 


.eveal-load-more-posts {
    display: flex;
    flex-wrap: wrap;
    column-gap: 30px;
    row-gap: 30px;
}

.eveal-load-more-posts article {
    width: calc((100% - 60px)/3);
    min-width: 300px;
    border: 1px solid #666;
    box-sizing: border-box;
    padding: 24px;
}

/* Latest Posts Shortcode Styles */
.craftkit-latest-posts {
    margin: 2rem auto;
    max-width: min(1236px, 80%);
}

.craftkit-latest-posts .craftkit-post-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.craftkit-latest-posts .craftkit-post-item h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.craftkit-latest-posts .craftkit-post-item h3 a {
    color: #333;
    text-decoration: none;
}

.craftkit-latest-posts .post-meta {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.craftkit-latest-posts .post-date,
.craftkit-latest-posts .post-author {
    display: inline-block;
    margin-right: 1rem;
}

.craftkit-latest-posts .post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
    font-size: 1.14rem;
}

/* Filter Style Options */
/* Checkbox Filters - CraftKit Classes */
.checkbox-filters {
    max-width: 100%;
    background: white;
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 12px 0 0;
    z-index: 2;
    position: relative;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    padding: 0.25rem;
    border-radius: 3px;
}

.filter-checkbox:hover {
    background-color: #f8f9fa;
}

.filter-checkbox:last-child {
    margin-bottom: 0;
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
    height: 20px;
    width: 20px;
    vertical-align: middle;
}

.filter-checkbox input[type="checkbox"]:checked {
    background: #007cba;
}

/* Button Filters */
.button-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.filter-button {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    background: white;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-button:hover {
    border-color: #007cba;
    color: #007cba;
}

.filter-button.active {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

/* Tab Filters */
.tab-filters {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-top: 0.5rem;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.filter-tab:hover {
    color: #007cba;
    background: #f8f9fa;
}

.filter-tab.active {
    color: #007cba;
    border-bottom-color: #007cba;
    font-weight: 600;
}


/* Responsive adjustments for filter styles */
@media (max-width: 768px) {
    .button-filters {
        flex-direction: column;
    }
    
    .tab-filters {
        flex-wrap: wrap;
    }
    
    .filter-tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}