/**
 * Resource Library Plugin Styles
 */

/* Category and Tag Filter Styles */
.resource-type-item,
.resource-tag-item {
    display: grid;
    grid-template-columns: 1em auto;
    gap: 16px;
    padding: 5px 8px;
    align-items: center;
}

.resource-type-item input[type="checkbox"],
.resource-tag-item input[type="checkbox"] {
    font: inherit;
    color: currentColor;
    width: 1.15em;
    height: 1.15em;
    border: 0.15em solid currentColor;
    border-radius: 0.15em;
}

.resource-type-item label,
.resource-tag-item label {
    margin: 0;
    cursor: pointer;
    flex-grow: 1;
    line-height: 1.2;
}

.resource-type-item:hover,
.resource-tag-item:hover {
    background-color: #f5f5f5;
}

/* Resource Item Styles */
.resource-item {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.resource-item:hover {
    text-decoration: none;
    color: inherit;
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.15);
    transform: translateY(-2px);
}

.resource-featured-image {
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 6px;
}

.resource-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.resource-content {
    flex-grow: 1;
}

.resource-title {
}

.resource-excerpt p {
    margin: 0;
}

.resource-types a,
.resource-tags a{
    display: inline-block;
    margin-right: 8px;
}

/* Loading Indicator */
.wfrc-loading {
    text-align: center;
    padding: 40px 20px;
    font-style: italic;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.wfrc-loading::before {
    content: "⏳ ";
    font-style: normal;
    margin-right: 8px;
}

/* Results Count */
.resources-count,
.results-count {
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #f0f8ff;
    border-left: 4px solid #007cba;
    border-radius: 4px;
}

/* Filter Section Styles */
.wp-block-categories-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wp-block-categories-list .cat-item {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Responsive Design */
@media (min-width: 768px) {
    .resource-item {
        display: flex;
        align-items: flex-start;
        gap: 16px;
    }
    
    .resource-featured-image {
        width: 200px;
        flex-shrink: 0;
        margin-bottom: 0;
    }
    
    .resource-content {
        flex-grow: 1;
    }
}

@media (max-width: 767px) {
    .resource-item {
        padding: 12px;
    }
    
    .resource-title {
        font-size: 1.1em;
    }
}

/* Error Message Styles */
.wfrc-error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #f44336;
    color: white;
    padding: 20px;
    border-radius: 8px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 90vw;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.wfrc-error-message h3 {
    margin: 0 0 12px 0;
    font-size: 1.2em;
}

.wfrc-error-message p {
    margin: 8px 0;
    line-height: 1.4;
}

.wfrc-error-message button {
    background: white;
    color: #f44336;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 12px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.wfrc-error-message button:hover {
    background-color: #f5f5f5;
}

/* Static styles that don't need customization */
.wfrc-date-range-filter .date-filter-label {
    margin: 0 0 25px 0;
    display: block;
}

.wfrc-date-range-filter .date-filter-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wfrc-date-range-filter .date-range-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.wfrc-date-range-filter .range-label {
    color: #666;
    font-size: 14px;
}

.wfrc-date-range-filter .range-values {
    font-weight: 600;
    font-size: 16px;
}

.wfrc-date-range-filter .date-slider-container {
    position: relative;
    margin: 15px 0;
}

.wfrc-date-range-filter .dual-range-slider {
    position: relative;
    display: flex;
    align-items: center;
}

.wfrc-date-range-filter .range-input {
    position: absolute;
    width: 100%;
    height: 6px;
    background: transparent;
    outline: none;
    appearance: none;
    pointer-events: none;
    z-index: 2;
}

.wfrc-date-range-filter .range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.wfrc-date-range-filter .range-input::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    -moz-appearance: none;
}

.wfrc-date-range-filter .range-input::-webkit-slider-thumb:hover {
    filter: brightness(0.8);
}

.wfrc-date-range-filter .range-input::-moz-range-thumb:hover {
    filter: brightness(0.8);
}

.wfrc-date-range-filter .range-input::-webkit-slider-track {
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: transparent;
    border-radius: 3px;
}

.wfrc-date-range-filter .range-input::-moz-range-track {
    height: 6px;
    background: transparent;
    border-radius: 3px;
    border: none;
    -moz-appearance: none;
}

.wfrc-date-range-filter .range-min {
    z-index: 3;
}

.wfrc-date-range-filter .range-max {
    z-index: 4;
}

.wfrc-date-range-filter .slider-track {
    position: absolute;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    z-index: 1;
    top: 50%;
    transform: translateY(-50%);
}

.wfrc-date-range-filter .slider-range {
    position: absolute;
    height: 100%;
    border-radius: 3px;
    z-index: 1;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.wfrc-date-range-filter .date-year-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.wfrc-date-range-filter .date-filter-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.wfrc-date-range-filter .apply-date-filter-btn,
.wfrc-date-range-filter .clear-date-filter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 100px;
}

.wfrc-date-range-filter .apply-date-filter-btn:hover,
.wfrc-date-range-filter .clear-date-filter-btn:hover {
    filter: brightness(0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wfrc-date-range-filter .date-filter-info {
    margin-top: 15px;
    padding: 10px 15px;
    background-color: rgba(0, 124, 186, 0.1);
    border: 1px solid rgba(0, 124, 186, 0.3);
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.wfrc-date-range-filter .filter-active-text {
    font-weight: 500;
}


/* Date Range Filter Responsive Styles */
@media (max-width: 768px) {
    .wfrc-date-range-filter {
        padding: 15px;
    }
    
    .wfrc-date-range-filter .date-filter-actions {
        flex-direction: column;
    }
    
    .wfrc-date-range-filter .apply-date-filter-btn,
    .wfrc-date-range-filter .clear-date-filter-btn {
        width: 100%;
    }
}