/**
 * Events List Block Custom Styles
 * 
 * This file provides custom styling for the Events List Block
 * and serves as a fallback when The Events Calendar plugin styles
 * are not available or have changed paths.
 * 
 * @package North Memorial
 */

/* Events List Block Container */
.nmh-events-list-block {
    margin: 2rem 0;
}

.nmh-events-list-block__block-header {
    margin-bottom: 1.5rem;
}

.nmh-events-list-block__block-header h2 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.nmh-events-list-block__block-header div {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}


.nmh-events-list-block .tribe-events-calendar-list__event-row:has(.tribe-common-c-btn.button-primary) {
    box-shadow: none;
    border: none;
    background: none;
}
.nmh-events-list-block .tribe-common-c-btn.button-primary {
    text-decoration: none;
}

/* Events Calendar List Styles - Fallback */
.tribe-events-calendar-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tribe-events-calendar-list__month-separator {
    margin: 2rem 0 1rem 0;
    padding: 0.5rem 0;
    border-bottom: 2px solid #e0e0e0;
}

.tribe-events-calendar-list__month-separator-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Event Row */
.tribe-common-g-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.tribe-events-calendar-list__event-row {
    display: flex;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.tribe-events-calendar-list__event-row:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Event Date Tag */
.tribe-events-calendar-list__event-date-tag {
    flex: 0 0 auto;
    width: 80px;
    margin-right: 1rem;
    text-align: center;
}

.tribe-events-calendar-list__event-date-tag-datetime {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.tribe-events-calendar-list__event-date-tag-weekday {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.tribe-events-calendar-list__event-date-tag-daynum {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

/* Event Wrapper */
.tribe-events-calendar-list__event-wrapper {
    flex: 1;
    min-width: 0;
}

.tribe-events-calendar-list__event {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Event Details */
.tribe-events-calendar-list__event-details {
    flex: 1;
}

.tribe-events-calendar-list__event-header {
    margin-bottom: 0.75rem;
}

.tribe-events-calendar-list__event-datetime-wrapper {
    margin-bottom: 0.5rem;
}

.tribe-events-calendar-list__event-datetime {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.tribe-events-calendar-list__event-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
}

.tribe-events-calendar-list__event-title-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tribe-events-calendar-list__event-title-link:hover {
    color: #007cba;
    text-decoration: underline;
}

.tribe-events-calendar-list__event-venue {
    font-size: 0.875rem;
    color: #666;
    font-style: normal;
    margin: 0;
}

.tribe-events-calendar-list__event-venue-title {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 0.25rem;
}

.tribe-events-calendar-list__event-venue-address {
    display: block;
    color: #666;
}

.tribe-events-calendar-list__event-description {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

.tribe-events-calendar-list__event-description p {
    margin: 0;
}

/* More Events Button */
.tribe-common-c-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.tribe-common-c-btn:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

.button-primary {
    background: #007cba;
}

.button-primary:hover {
    background: #005a87;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tribe-events-calendar-list__event-row {
        flex-direction: column;
    }
    
    .tribe-events-calendar-list__event-date-tag {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .tribe-events-calendar-list__event-date-tag-datetime {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }
    
    .tribe-events-calendar-list__event-date-tag-weekday {
        margin-bottom: 0;
    }
    
    .tribe-events-calendar-list__event-title {
        font-size: 1rem;
    }
}

/* Accessibility Improvements */
.tribe-events-calendar-list__event-title-link:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.tribe-common-c-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .tribe-events-calendar-list__event-row {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .tribe-common-c-btn {
        display: none;
    }
}
