/**
 * Custom Organization Filter Styles
 *
 * @package    Apprenticeshiphq_Directory
 * @subpackage Apprenticeshiphq_Directory/public/css
 * @author     TrailBlaze Creative <info@trailblazecreative.com>
 * @since      1.8.0
 */

/* =============================================================================
   Custom Organization Filter Styles
   ========================================================================== */

.ahq-organization-filter-container {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ahq-filter-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ahq-filter-label {
    font-weight: 600;
    color: #000000;
    margin: 0;
    white-space: nowrap;
    text-shadow: none;
}

.ahq-organization-filter {
    min-width: 200px;
    /*! padding: 8px 12px; */
    /*! border: 1px solid #ced4da; */
    border-radius: 0;
    font-size: 14px;
    color: #495057;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.ahq-organization-filter:focus {
    outline: none;
    border-color: #519AAE;
    box-shadow: 0 0 0 0.2rem rgba(81, 154, 174, 0.25);
}

.ahq-organization-filter:hover {
    border-color: #519AAE;
}

/* Loading States */
.ahq-filter-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
}

.ahq-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #519AAE;
    border-radius: 50%;
    animation: ahq-spin 1s linear infinite;
}

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

.ahq-loading {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Error States */
.ahq-filter-error {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    margin: 20px 0;
}

.ahq-filter-error p {
    margin: 0;
    font-size: 14px;
}

/* No Results States */
.ahq-no-events,
.ahq-no-videos,
.ahq-no-photos {
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 20px 0;
}

.ahq-no-events p,
.ahq-no-videos p,
.ahq-no-photos p {
    margin: 0;
    color: #6c757d;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ahq-filter-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .ahq-organization-filter {
        min-width: 100%;
    }

    .ahq-filter-label {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ahq-organization-filter-container {
        padding: 10px;
        margin: 15px 0;
    }

    .ahq-filter-wrapper {
        gap: 8px;
    }

    .ahq-organization-filter {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Integration with existing content styles */
.ahq-events-container.ahq-loading,
.ahq-videos-container.ahq-loading,
.ahq-photos-container.ahq-loading {
    position: relative;
}

.ahq-events-container.ahq-loading::after,
.ahq-videos-container.ahq-loading::after,
.ahq-photos-container.ahq-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    pointer-events: none;
}

/* Accessibility improvements */
.ahq-organization-filter:focus {
    outline: 2px solid #519AAE;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .ahq-spinner,
    .ahq-loading,
    .ahq-organization-filter {
        animation: none;
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ahq-organization-filter-container {
        border: 2px solid #000;
        background: #fff;
    }

    .ahq-organization-filter {
        border: 2px solid #000;
    }

    .ahq-filter-error {
        border: 2px solid #d00;
        background: #fff;
        color: #d00;
    }
}