/**
 * Nilea Events Styles
 * 
 * Event-specific styles for the Nilea plugin
 * Common layout styles are now in nilea-layout.css
 * 
 * @package Nilea_Plugin
 */

/**
 * Event specific styles
 */

.event-meta-banner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    color: #666;
    font-size: 0.95rem;
}

.event-date-banner,
.event-categories-banner {
    padding: 0.25rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
}

.event-featured-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.event-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.event-content {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.event-meta {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.event-meta-date,
.event-meta-time,
.event-location {
    margin-bottom: 0.75rem;
}

/* Event excerpt and buttons */
.event-excerpt {
    padding: 0 1rem 1rem;
    color: #555;
}

.event-more-link {
    margin-top: 1rem;
}

.event-back-link,
.event-actions {
    margin-top: 2rem;
}

/**
 * Event Sidebar Navigation
 * Note: Core sidebar styles are now in nilea-sidebar.css
 */

/* Sidebar Navigation Styles - moved to nilea-sidebar.css */

/* Submenu styles - moved to nilea-sidebar.css */

/* Section anchors */
#events-calendar,
#events-list {
    scroll-margin-top: 30px;
}

/**
 * Calendar View Styles
 */

/* Calendar Container */
.events-calendar-view {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

/* Initially hide the calendar view */
.events-calendar-view.hidden {
    display: none;
}

/* Calendar View Controls */
.calendar-view-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.toggle-view-button {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-view-button:hover {
    background-color: #e0e0e0;
}

#nilea-calendar {
    height: auto;
    min-height: 600px;
    background-color: white;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.fc-header-toolbar {
    padding: 1rem;
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
}

/* Ensure buttons in FullCalendar are visible */
.fc .fc-button-group {
    display: flex !important;
    visibility: visible !important;
}

.fc .fc-button-primary {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
    visibility: visible !important;
    display: inline-block !important;
}

.fc .fc-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    border-radius: 4px;
    visibility: visible !important;
    display: inline-block !important;
}

.fc .fc-button:not(:disabled) {
    cursor: pointer;
}

.fc .fc-view-harness {
    width: 100% !important;
    overflow: auto;
}

/* Fix events container width */
.events-calendar-view {
    width: 100%;
    overflow-x: auto;
}

.calendar-empty-message {
    text-align: center;
    margin: 2rem 0;
    color: #666;
}

/* Fix for pagination buttons visibility */
.wp-block-query-pagination {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.wp-block-query-pagination-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wp-block-query-pagination-numbers .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.wp-block-query-pagination-numbers .page-numbers.current {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.wp-block-query-pagination-numbers .page-numbers:hover:not(.current) {
    background-color: #e5e5e5;
}

/* Events Grid for the new structure */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.event-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.event-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.event-featured-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.event-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-item:hover .event-featured-image img {
    transform: scale(1.05);
}

.event-title {
    padding: 1rem 1rem 0.5rem;
    margin: 0;
}

.event-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.event-title a:hover {
    color: #0073aa;
}

.event-date {
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Event styling */
.fc-event {
    border-radius: 4px;
    border: none;
    padding: 2px 4px;
    font-size: 0.85em;
    cursor: pointer;
}

.fc-event-title {
    font-weight: 600;
}

.fc-event-time {
    font-weight: normal;
    opacity: 0.8;
}

/* Header styling */
.fc-header-toolbar {
    margin-bottom: 1.5rem !important;
}

.fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 600;
}

/* Button styling */
.fc-button-primary {
    background-color: #0073aa !important;
    border-color: #0073aa !important;
}

.fc-button-primary:hover {
    background-color: #005177 !important;
    border-color: #005177 !important;
}

.fc-button-active {
    background-color: #005177 !important;
    border-color: #005177 !important;
}

/* Today button */
.fc-today-button {
    font-weight: 500 !important;
}

/* Day headers */
.fc-col-header-cell {
    background-color: #f8f9fa;
    padding: 10px 0 !important;
}

.fc-col-header-cell-cushion {
    color: #333;
    font-weight: 600;
    text-decoration: none !important;
}

/* Day cells */
.fc-daygrid-day {
    transition: background-color 0.2s ease;
}

.fc-day-today {
    background-color: rgba(0, 115, 170, 0.1) !important;
}

/* Loading state */
.calendar-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/**
 * Event Registration Form Styles
 */

/* Event Registration Container */
.event-registration-container {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.event-registration-container h3 {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.75rem;
}

/* Event Capacity Info */
.event-capacity-info,
.capacity-info {
    margin: 1rem 0;
    padding: 0.75rem;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Forms */
.event-registration-form .form-field {
    margin-bottom: 1.25rem;
}

.event-registration-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.event-registration-form .form-field input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Officers Grid Layout */
.officers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.event-registration-form .officer-checkbox {
    margin-bottom: 0.75rem;
}

.event-registration-form .officer-checkbox label {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #555;
}

.capacity-warning {
    color: #dc3545;
    font-weight: bold;
}

/* Response Messages */
.registration-response-message {
    margin-top: 1rem;
    min-height: 40px;
}

.success-message {
    padding: 0.75rem;
    background-color: #d4edda;
    color: #155724;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

.error-message {
    padding: 0.75rem;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* Notice */
.event-registration-notice {
    padding: 1rem;
    background-color: #fff3cd;
    color: #856404;
    border-radius: 4px;
    border: 1px solid #ffeeba;
    margin-top: 1rem;
}

/* Success States */
.registration-success,
.registration-cancelled {
    padding: 1rem;
    background-color: #d4edda;
    color: #155724;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    margin-top: 1rem;
}

.registration-cancelled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading Spinner */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/**
 * Responsive Styles
 */
@media (max-width: 768px) {
    /* Calendar adjustments */
    .fc-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
    
    .fc-header-toolbar {
        margin-bottom: 1rem !important;
    }
    
    /* Sidebar adjustments */
    .events-layout {
        flex-direction: column;
    }
    
    .events-sidebar {
        flex: 0 0 100%;
        margin-bottom: 1.5rem;
    }
    
    /* Officers grid adjustments */
    .officers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Form action buttons */
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .officers-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 2rem;
    }
}
