/**
 * Emergency Colors Fix
 * Overrides all existing color schemes with !important rules
 */

:root {
    /* Primary Colors */
    --primary-color: #1a73e8 !important;          /* Google Blue */
    --primary-hover-color: #1557b0 !important;    /* Darker blue */
    --secondary-color: #34a853 !important;        /* Google Green */
    --accent-color: #fbbc04 !important;           /* Google Yellow */
    --dark-color: #202124 !important;             /* Near black */
    --light-color: #f8f9fa !important;            /* Off-white */
    
    /* Text Colors */
    --text-primary: #202124 !important;           /* Dark gray */
    --text-secondary: #5f6368 !important;         /* Medium gray */
    --text-light: #ffffff !important;             /* White */
    --text-link: #1a73e8 !important;              /* Blue */
    
    /* UI Element Colors */
    --border-color: #dadce0 !important;           /* Light gray */
    --card-bg: #ffffff !important;                /* White */
    --hover-bg: #f1f3f4 !important;               /* Light gray */
    
    /* Status Colors */
    --success-color: #34a853 !important;          /* Green */
    --warning-color: #fbbc04 !important;          /* Yellow */
    --error-color: #ea4335 !important;            /* Red */
    --info-color: #1a73e8 !important;             /* Blue */
    
    /* Legacy compatibility */
    --wp--preset--color--primary: #1a73e8 !important;
    --wp--preset--color--secondary: #34a853 !important;
    --wp--preset--color--light: #f8f9fa !important;
    --wp--preset--color--dark: #202124 !important;
    --wp--preset--color--accent: #fbbc04 !important;
}

/* Direct element styling */
body {
    color: #202124 !important;
    background-color: #f8f9fa !important;
}

a {
    color: #1a73e8 !important;
}

a:hover {
    color: #1557b0 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #202124 !important;
}

.section-description {
    color: #5f6368 !important;
    background-color: #f8f9fa !important;
    border-left: 4px solid #1a73e8 !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

.btn, 
.wp-element-button, 
.wp-block-button__link,
.bus-stop-card-link {
    background-color: #1a73e8 !important;
    color: #ffffff !important;
}

.btn:hover, 
.wp-element-button:hover, 
.wp-block-button__link:hover,
.bus-stop-card-link:hover {
    background-color: #1557b0 !important;
    color: #ffffff !important;
}

.taxonomy-hero {
    background-color: #1a73e8 !important;
    background-image: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%) !important;
}

.taxonomy-title {
    color: #ffffff !important;
}

.directory-item-card {
    background-color: #ffffff !important;
    border: 1px solid #dadce0 !important;
    box-shadow: 0 2px 10px rgba(60, 64, 67, 0.15) !important;
}

.directory-item-card-title a {
    color: #202124 !important;
}

.directory-item-card-meta-item {
    color: #5f6368 !important;
}

.directory-item-card-meta-item.hours span {
    display: inline-block !important;
}

.directory-item-card-meta-item i {
    color: #1a73e8 !important;
}

/* Force hero title to be white */
.hero-title {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5) !important;
}

/* Style for empty busyness levels (no text shown) */
.busyness-level.empty-busyness {
    height: 20px;
    display: block !important;
}

/* Hide any remaining 'Not available' text */
.busyness-level:contains('Not available') {
    visibility: hidden !important;
}

/* Ensure consistent spacing in popular times grid */
.popular-times-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

/* Style time periods for better visibility */
.time-period {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Enhanced status indicators */
.status-open {
    color: #34a853 !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    background-color: rgba(52, 168, 83, 0.1) !important;
    padding: 4px 10px !important;
    border-radius: 16px !important;
    margin-top: 4px !important;
}

.status-closed {
    color: #ea4335 !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    background-color: rgba(234, 67, 53, 0.1) !important;
    padding: 4px 10px !important;
    border-radius: 16px !important;
    margin-top: 4px !important;
}

/* Hours display styling */
.directory-item-card-meta-item.hours {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
}

.directory-item-card-meta-item.hours i.fas.fa-clock {
    color: #1a73e8 !important;
    margin-right: 0 !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
}

.directory-item-card-meta-item.hours span i {
    margin-right: 6px !important;
}

/* Responsive styles for hours display */
@media (max-width: 768px) {
    .directory-item-card-meta-item.hours {
        width: 100% !important;
    }
    
    .status-open,
    .status-closed {
        font-size: 14px !important;
        padding: 3px 8px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .directory-item-card-meta-item.hours {
        align-items: flex-start !important;
    }
    
    .status-open,
    .status-closed {
        font-size: 13px !important;
        padding: 2px 6px !important;
    }
}

/* Status icon animation */
.status-open i.fas.fa-door-open {
    animation: pulse-green 2s infinite !important;
}

.status-closed i.fas.fa-door-closed {
    animation: pulse-red 2s infinite !important;
}

@keyframes pulse-green {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes pulse-red {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Read More Links */
a.read-more {
    display: inline-flex !important;
    align-items: center !important;
    color: #1a73e8 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    padding: 6px 12px !important;
    border-radius: 16px !important;
    background-color: rgba(26, 115, 232, 0.1) !important;
    transition: all 0.2s ease !important;
}

a.read-more:hover {
    background-color: rgba(26, 115, 232, 0.2) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

a.read-more i {
    margin-left: 6px !important;
    font-size: 0.85em !important;
    transition: transform 0.2s ease !important;
}

a.read-more:hover i {
    transform: translateX(3px) !important;
}

/* Footer styling */

.site-footer {
    background-color: #202124 !important;
    color: #ffffff !important;
}

.footer-widget-title {
    color: #ffffff !important;
}

.footer-widget a {
    color: #ffffff !important;
    opacity: 0.8 !important;
}

.footer-widget a:hover {
    opacity: 1 !important;
}
