/**
 * CureClass Events Modern Icons & Enhanced Styling
 *
 * @package CureClass_Events
 * @version 1.0.0
 */

/* ==========================================================================
   Modern Icon Styling
   ========================================================================== */

/* Icon containers with modern styling */
.cce-date-icon,
.cce-time-icon,
.cce-location-icon,
.cce-capacity-icon,
.cce-type-icon,
.cce-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    color: var(--cce-primary);
    margin-right: 8px;
    transition: all 0.3s ease;
}

.cce-date-icon i,
.cce-time-icon i,
.cce-location-icon i,
.cce-capacity-icon i,
.cce-type-icon i,
.cce-meta-icon i {
    font-size: 12px;
}

/* Icon hover effects */
.cce-event-card:hover .cce-date-icon,
.cce-event-card:hover .cce-time-icon,
.cce-event-card:hover .cce-location-icon,
.cce-event-card:hover .cce-capacity-icon {
    background: var(--cce-primary);
    color: white;
    transform: scale(1.1);
}

/* Event type specific icon styling */
.cce-type-online .cce-type-icon {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.cce-type-in-person .cce-type-icon {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.cce-type-hybrid .cce-type-icon {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* Status icons with modern styling */
.cce-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cce-status-badge i {
    font-size: 10px;
}

.cce-badge-free {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.cce-badge-full {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.cce-badge-started {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #000;
}

.cce-badge-closed {
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
}

/* ==========================================================================
   Modern Button Styling
   ========================================================================== */

.cce-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cce-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.cce-btn:hover::before {
    left: 100%;
}

.cce-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
}

.cce-btn-primary:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.cce-btn-secondary {
    background: #ffffff;
    border: 2px solid #e9ecef;
    color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cce-btn-secondary:hover {
    border-color: #667eea;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.cce-btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    position: relative;
}

.cce-btn-outline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #667eea;
    transition: width 0.3s ease;
    z-index: -1;
}

.cce-btn-outline:hover::after {
    width: 100%;
}

.cce-btn-outline:hover {
    color: white;
}

/* Button sizes */
.cce-btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 16px;
}

.cce-btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 8px;
}

/* Button with icons */
.cce-btn i {
    margin-right: 6px;
    font-size: 0.9em;
}

/* ==========================================================================
   Modern Card Styling
   ========================================================================== */

.cce-event-card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
}

.cce-event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.cce-event-card:hover::before {
    transform: scaleX(1);
}

.cce-event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.cce-event-image {
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.cce-event-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cce-event-card:hover .cce-event-image::after {
    opacity: 1;
}

.cce-event-type-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 20px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Modern Form Styling
   ========================================================================== */

.cce-booking-form-container {
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #ffffff;
}

.cce-booking-event-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: none;
    position: relative;
}

.cce-booking-event-summary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
}

/* ==========================================================================
   Modern Status Indicators
   ========================================================================== */

.cce-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3); }
    50% { box-shadow: 0 4px 16px rgba(220, 53, 69, 0.5); }
}

.cce-live-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* ==========================================================================
   Modern Countdown Styling
   ========================================================================== */

.cce-countdown-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.cce-countdown-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.cce-countdown-timer {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.cce-countdown-unit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 16px 12px;
    min-width: 70px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.cce-countdown-unit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.cce-countdown-unit span {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    display: block;
}

.cce-countdown-unit label {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   Modern Chat Styling
   ========================================================================== */

.cce-chat-container {
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: none;
}

.cce-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.cce-chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.cce-chat-btn {
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cce-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cce-chat-message {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cce-chat-message:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* ==========================================================================
   Modern Dashboard Styling
   ========================================================================== */

.cce-stat-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.cce-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.cce-stat-primary::before {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.cce-stat-success::before {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.cce-stat-info::before {
    background: linear-gradient(135deg, #17a2b8, #20c997);
}

.cce-stat-warning::before {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.cce-stat-card .cce-stat-icon {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

/* ==========================================================================
   Modern Input Styling
   ========================================================================== */

.cce-filter-input,
.cce-filter-select,
.cce-search-input {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.cce-filter-input:focus,
.cce-filter-select:focus,
.cce-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.cce-search-button {
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.cce-search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* ==========================================================================
   Modern Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.cce-event-card {
    animation: fadeInUp 0.6s ease forwards;
}

.cce-event-card:nth-child(2) {
    animation-delay: 0.1s;
}

.cce-event-card:nth-child(3) {
    animation-delay: 0.2s;
}

.cce-event-card:nth-child(4) {
    animation-delay: 0.3s;
}

.cce-status-badge {
    animation: slideInRight 0.5s ease forwards;
}

.cce-countdown-unit {
    animation: bounceIn 0.8s ease forwards;
}

.cce-countdown-unit:nth-child(2) {
    animation-delay: 0.1s;
}

.cce-countdown-unit:nth-child(3) {
    animation-delay: 0.2s;
}

.cce-countdown-unit:nth-child(4) {
    animation-delay: 0.3s;
}

/* ==========================================================================
   Modern Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .cce-event-card {
        border-radius: 12px;
        margin: 0 -8px;
    }
    
    .cce-countdown-timer {
        gap: 8px;
    }
    
    .cce-countdown-unit {
        min-width: 60px;
        padding: 12px 8px;
        border-radius: 8px;
    }
    
    .cce-btn {
        border-radius: 8px;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .cce-event-card {
        background: #1e1e1e;
        color: #e0e0e0;
    }
    
    .cce-filter-input,
    .cce-filter-select,
    .cce-search-input {
        background: #2a2a2a;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .cce-booking-form-container {
        background: #1e1e1e;
        color: #e0e0e0;
    }
    
    .cce-countdown-container {
        background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
        color: #e0e0e0;
    }
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .cce-event-card,
    .cce-btn,
    .cce-countdown-unit,
    .cce-status-badge {
        animation: none !important;
        transition: none !important;
    }
    
    .cce-event-card:hover {
        transform: none !important;
    }
    
    .cce-btn:hover {
        transform: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cce-event-card {
        border: 2px solid #000;
    }
    
    .cce-btn {
        border: 2px solid;
    }
    
    .cce-status-badge {
        border: 1px solid #000;
    }
}

/* Focus indicators for better accessibility */
.cce-btn:focus,
.cce-filter-input:focus,
.cce-filter-select:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* ==========================================================================
   Modern Loading States
   ========================================================================== */

.cce-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(102, 126, 234, 0.1);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: modernSpin 1s linear infinite;
}

@keyframes modernSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cce-loading-events {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #6c757d;
}

.cce-loading-events .cce-loading-spinner {
    margin-bottom: 16px;
}
