/* Events Module CSS - Styles specific to event pages */

.events-container {
    font-family: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
}

.events-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 1rem;
    transition: all 0.3s ease;
}

@media (min-width: 640px) {
    .events-card { padding: 1.5rem; }
}

@media (min-width: 1024px) {
    .events-card { padding: 2rem; }
}

.events-btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.events-btn-primary {
    background-color: #4f46e5;
    color: white;
}

.events-btn-primary:hover {
    background-color: #4338ca;
}

.events-btn-secondary {
    background-color: #6b7280;
    color: white;
}

.events-btn-secondary:hover {
    background-color: #4b5563;
}

.events-btn-success {
    background-color: #10b981;
    color: white;
}

.events-btn-success:hover {
    background-color: #059669;
}

.events-btn-danger {
    background-color: #ef4444;
    color: white;
}

.events-btn-danger:hover {
    background-color: #dc2626;
}

.event-profile-pic-container {
    position: relative;
    width: 128px;
    height: 128px;
}

.event-profile-pic {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-profile-pic-label {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: #4f46e5;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-profile-pic-container:hover .event-profile-pic-label {
    opacity: 1;
}

.event-form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.event-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f9fafb;
    transition: all 0.3s ease;
}

.event-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.event-card h3 {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #111827;
}

.event-card .event-date {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.event-card .event-location {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.event-card .event-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.event-status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.event-status-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.event-status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.event-calendar {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.event-calendar-header {
    background-color: #4f46e5;
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
}

.event-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e5e7eb;
}

.event-calendar-day {
    background-color: white;
    padding: 0.5rem;
    min-height: 80px;
    position: relative;
}

.event-calendar-day.other-month {
    background-color: #f9fafb;
    color: #9ca3af;
}

.event-calendar-day.today {
    background-color: #eff6ff;
    border: 2px solid #3b82f6;
}

.event-calendar-event {
    background-color: #3b82f6;
    color: white;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.event-calendar-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.event-list {
    max-height: 400px;
    overflow-y: auto;
}

.event-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
}

.event-list-item:hover {
    background-color: #f9fafb;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-list-item:last-child {
    border-bottom: none;
}

.event-color-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.event-details {
    flex-grow: 1;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .events-container { 
        padding-left: 1rem; 
        padding-right: 1rem; 
    }
    
    .events-btn, button { 
        min-height: 44px; 
        min-width: 44px; 
    }
    
    .event-calendar-grid {
        font-size: 0.875rem;
    }
    
    .event-calendar-day {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    .event-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .event-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Loading states */
.events-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: #6b7280;
}

.events-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error states */
.events-error {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin: 1rem 0;
}

/* Success states */
.events-success {
    background-color: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin: 1rem 0;
}

/* Form validation */
.event-form-field.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.event-form-field.valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.event-form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Admin panel specific styles */
.admin-events-panel {
    max-width: 900px;
    margin: 2rem auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.admin-event-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f9fafb;
}

.admin-event-card h3 {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.admin-event-card button {
    background-color: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.5rem;
    border: none;
    font-size: 0.875rem;
}

.admin-event-card button:hover {
    background-color: #059669;
}

.admin-event-card button.reject {
    background-color: #ef4444;
}

.admin-event-card button.reject:hover {
    background-color: #dc2626;
}

.login-prompt {
    text-align: center;
    padding: 2rem;
    border: 1px dashed #ccc;
    border-radius: 8px;
    margin-top: 2rem;
    color: #6b7280;
}
