/* LO Event Calendar - Public Styles */

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

.lo-event-calendar-wrapper {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.lo-calendar-title {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.8em;
    font-weight: 600;
}

/* Calendar Navigation */
.lo-calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.nav-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background: #2980b9;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.current-month {
    font-size: 1.4em;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

/* Calendar Grid */
.lo-calendar-grid {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #34495e;
    color: white;
}

.weekday-header {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
}

.calendar-day {
    background: white;
    min-height: 80px;
    max-height: 120px;
    padding: 8px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.empty-day {
    background: #f5f5f5;
    cursor: default;
}

.calendar-day.today {
    background: #e8f5e8;
    border: 2px solid #27ae60;
}

.calendar-day.has-events {
    background: #fff3cd;
}

.day-number {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.day-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Event title anchor links in calendar grid */
.event-title-link {
    text-decoration: none;
    display: block;
}

.event-title-link:hover .event-title {
    opacity: 0.8;
}

/* Event titles in calendar grid */
.calendar-day .event-title {
    font-size: 0.65em;
    color: #2c3e50;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.event-time {
    color: #3498db;
    font-weight: 600;
    font-size: 0.9em;
}

.event-name {
    color: #2c3e50;
}

.event-more {
    font-size: 0.7em;
    color: #7f8c8d;
    font-weight: 500;
    margin-top: 2px;
    font-style: italic;
}

/* Loading state */
.lo-event-calendar-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Event List Styles */
.lo-event-list-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.lo-event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lo-event-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.lo-event-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.event-thumbnail {
    flex-shrink: 0;
    width: 300px;
    overflow: hidden;
    border-radius: 4px;
}

.event-thumbnail a {
    display: block;
    transition: opacity 0.3s ease;
}

.event-thumbnail a:hover {
    opacity: 0.85;
}

.event-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.event-content {
    flex: 1;
    min-width: 0;
}

.event-header {
    margin-bottom: 12px;
}

.event-title {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.event-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-title-link:hover {
    color: #3498db;
    text-decoration: none;
}

.event-datetime {
    color: #7f8c8d;
    font-size: 0.95em;
    font-weight: 500;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: #555;
    font-size: 0.9em;
}

.location-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #7f8c8d;
}

.event-description {
    margin-bottom: 12px;
    color: #555;
    line-height: 1.5;
}

.event-description p {
    margin: 0;
}

.event-link {
    margin-top: 12px;
}

/* Learn More button - let Elementor styles take over */
.event-details-link.elementor-button {
    display: inline-block;
    text-decoration: none;
    /* Remove custom styling to inherit from Elementor */
}

/* Fallback styling if Elementor class doesn't exist */
.event-details-link:not(.elementor-button) {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.event-details-link:not(.elementor-button):hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

.no-events {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    margin: 40px 0;
}

/* Modal Styles */
.lo-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.lo-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.lo-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 10px 20px 0 0;
    cursor: pointer;
}

.lo-modal-close:hover,
.lo-modal-close:focus {
    color: #000;
}

#lo-modal-body {
    padding: 20px;
}

#lo-modal-body h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.modal-events-list {
    margin-top: 20px;
}

.modal-event-item {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
}

.modal-event-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Modal event title links */
.modal-event-link {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.modal-event-link:hover {
    color: #3498db;
    text-decoration: underline;
}

.modal-event-item .event-thumbnail {
    flex-shrink: 0;
    width: 150px;
}

.modal-event-item .event-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.modal-event-item .event-content {
    flex: 1;
}

.modal-event-item h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.event-time {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.modal-event-item .event-location {
    margin-bottom: 8px;
}

.modal-event-item .event-description {
    margin-bottom: 12px;
}

.modal-event-item .button {
    background: #3498db;
    color: white;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85em;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.modal-event-item .button:hover {
    background: #2980b9;
    text-decoration: none;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lo-calendar-navigation {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .day-number {
        font-size: 0.8em;
    }
    
    .event-dot {
        height: 3px;
    }
    
    .weekday-header {
        padding: 8px 4px;
        font-size: 0.8em;
    }
    
    .lo-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .lo-event-item {
        padding: 16px;
        flex-direction: column;
    }

    .event-thumbnail {
        width: 100%;
        margin-bottom: 12px;
    }
    
    .event-title {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .calendar-day {
        min-height: 45px;
        padding: 2px;
    }
    
    .day-number {
        font-size: 0.75em;
    }
    
    .weekday-header {
        padding: 6px 2px;
        font-size: 0.7em;
    }
    
    .event-more {
        font-size: 0.6em;
    }
}