/**
 * Events e-Calendar - Frontend Styles
 * @package Events_eCalendar
 */

:root{
    --eventWhite: #FFFFFF;
    --eventsBlack: #000000;
    --eventsBlue: #1e5a8e;
    --eventsDarkBlue: #154770;
}

/* Calendar Wrapper */
.eec-calendar-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: var(--eventWhite);
    border-radius: 8px;
    max-width: 790px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* FullCalendar Customizations */
.fc { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;}

.fc .fc-button {
    background-color: var(--eventsBlue);
    border-color: var(--eventsBlue);
    color: var(--eventWhite);
    text-transform: capitalize;
}

.fc .fc-button:hover {
    background-color: var(--eventsDarkBlue);
    border-color: var(--eventsDarkBlue);
}

.fc .fc-button-active {
    background-color: var(--eventsDarkBlue);
    border-color: #0a4b78;
}

.fc .fc-button:focus { box-shadow: 0 0 0 0.2rem rgba(34, 113, 177, 0.5);}

.fc-event {
    cursor: pointer;
    transition: all 0.3s ease;
}
.fc .fc-toolbar-title{ font-size: 22px !important;}
.fc-event:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* Events List View */
.eec-events-list { margin: 20px 0;}

.eec-event-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    margin-bottom: 15px;
    background: var(--eventWhite);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.eec-event-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--eventsBlue);
}

.eec-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 10px;
    background: var(--eventsBlue);
    color: var(--eventWhite);
    border-radius: 6px;
    text-align: center;
}

.eec-event-day {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
}

.eec-event-month {
    font-size: 14px;
    text-transform: uppercase;
    margin-top: 5px;
}

.eec-event-details { flex: 1;}

.eec-event-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    line-height: 1.4;
}

.eec-event-title a {
    color: #1e1e1e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.eec-event-title a:hover { color: var(--eventsBlue);}

.eec-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.eec-event-meta .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.eec-event-time,
.eec-event-categories {
    display: flex;
    align-items: center;
    gap: 5px;
}

.eec-event-excerpt {
    margin-top: 10px;
    color: #666;
    line-height: 1.6;
}

.eec-no-events {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

.eec-msg{ 
    text-align: right;
    font-size: 12px;
    margin-top: 10px;
}

/* Day frame scrolling for multiple events */
.fc-liquid-hack .fc-daygrid-day-frame {
    max-height: 65px;
    overflow-y: auto;
    overflow-x: hidden;
}

th .fc-scroller-harness,
th .fc-scroller-harness .fc-scroller{ height: 32px;}
.fc-scrollgrid-sync-table{ margin-bottom: 0;}

/* Scrollbar */
.fc-liquid-hack .fc-daygrid-day-frame::-webkit-scrollbar { width: 6px;}
.fc-liquid-hack .fc-daygrid-day-frame::-webkit-scrollbar-track { background: #f1f1f1;}

.fc-liquid-hack .fc-daygrid-day-frame::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.fc-liquid-hack .fc-daygrid-day-frame::-webkit-scrollbar-thumb:hover { background: #555;}

/* Colored indicator for days with events */
.fc-daygrid-day-top { position: relative;}

.fc-daygrid-day-number {
    cursor: pointer;
    transition: color 0.2s;
}
.fc-daygrid-day-number:hover { color: var(--eventsBlue) !important;}

.fc-day-has-events .fc-daygrid-day-number::after {
    content: '📅';
    position: absolute;
    top: 4px;
    right: 32px;
    width: 6px;
    height: 6px;
}

.fc-day-has-events:hover{
    background: #f7f7f7;
    cursor: pointer;
}

/* Day Events Modal */
#eec-day-events-modal .eec-modal-content { max-width: 700px;}

.eec-day-event-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-left: 4px solid var(--eventsBlue);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.eec-day-event-item:hover {
    background: #f0f0f0;
    transform: translateX(4px);
}

.eec-day-event-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.eec-day-event-time {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.eec-day-event-description {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Event Modal Styles */
.eec-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

#eec-day-modal-title{ font-size: 22px;}

.eec-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.eec-modal-content {
    position: relative;
    background: var(--eventWhite);
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-height: 80vh;
    overflow-y: auto;
}

.eec-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.eec-modal-close:hover { color: var(--eventsBlack);}

#eec-modal-title {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

#eec-modal-body {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #666;
}

.eec-modal-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    text-align: right;
}

.eec-button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: var(--eventWhite) !important;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}

.eec-button:hover { background: #005177;}

.fc-header-toolbar{ background-color: var(--eventWhite) !important;}

/* Responsive Design */
@media (max-width: 768px) {
    .eec-calendar-wrapper { padding: 10px;}
    
    .eec-event-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .eec-event-date {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .eec-event-day { font-size: 24px;}
    .eec-event-title { font-size: 18px;}
    
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .fc .fc-button {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .fc .fc-toolbar-title { font-size: 18px;}
}
