/* RH Event Calendar Frontend Styles - Alice in Wonderland / Matrix Theme */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Fira+Code:wght@300;400;500&display=swap');

:root {
    --alice-primary: #1a0d26;
    --alice-secondary: #2d1b3d;
    --alice-accent: #4a2c5a;
    --alice-gold: #d4af37;
    --alice-silver: #c0c0c0;
    --alice-blue: #4169e1;
    --alice-purple: #8a2be2;
    --alice-green: #00ff41;
    --alice-red: #ff0040;
    --matrix-green: #00ff41;
    --matrix-dark: #0d1117;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: rgba(0, 0, 0, 0.3);
}

.rh-event-calendar {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Cinzel', serif;
    background: linear-gradient(135deg, var(--alice-primary) 0%, var(--alice-secondary) 50%, var(--matrix-dark) 100%);
    border-radius: 20px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.rh-event-calendar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 255, 65, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.rh-event-calendar > * {
    position: relative;
    z-index: 2;
}

/* Glassmorphism Calendar Header */
.rh-calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 8px 32px var(--glass-shadow);
    position: relative;
}

.rh-calendar-header::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--alice-gold), var(--alice-purple), var(--matrix-green));
    border-radius: 17px;
    z-index: -1;
    opacity: 0.3;
}

.rh-calendar-header h3 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--alice-gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
}

/* Hide navigation buttons when show_current_month_only is enabled */
.rh-calendar-nav {
    display: none;
}

/* Calendar Grid with Glassmorphism */
.rh-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px var(--glass-shadow);
}

.rh-calendar-day-header {
    background: linear-gradient(135deg, var(--alice-secondary), var(--alice-accent));
    color: var(--alice-gold);
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Fira Code', monospace;
    border-bottom: 1px solid var(--glass-border);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.rh-calendar-day {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    min-height: 120px;
    padding: 12px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.rh-calendar-day:hover {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border-color: var(--alice-gold);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.rh-calendar-day.rh-other-month {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
}

.rh-calendar-day.rh-today {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(138, 43, 226, 0.2));
    border: 2px solid var(--alice-gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.rh-calendar-day.rh-has-events {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1), rgba(138, 43, 226, 0.1));
    border-color: var(--matrix-green);
}

.rh-day-number {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--alice-silver);
    font-family: 'Fira Code', monospace;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

.rh-day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Event Items with Glassmorphism and Hover Effects */
.rh-event-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 8px 10px;
    border-radius: 8px;
    border-left: 3px solid var(--alice-gold);
    font-size: 12px;
    line-height: 1.3;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    color: var(--alice-silver);
    font-family: 'Cinzel', serif;
}

.rh-event-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.rh-event-item:hover::before {
    transform: translateX(100%);
}

.rh-event-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border-left-color: var(--matrix-green);
}

.rh-event-title {
    font-weight: 500;
    color: var(--alice-silver);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.2);
}

.rh-event-item:hover .rh-event-title {
    color: var(--alice-gold);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

/* Event Hover Preview */
.rh-event-preview {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 250px;
    max-width: 300px;
    pointer-events: none;
}

.rh-event-item:hover .rh-event-preview {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-100%);
}

.rh-event-preview-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--glass-border);
}

.rh-event-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--alice-gold);
    margin-bottom: 8px;
    font-family: 'Cinzel', serif;
}

.rh-event-preview-details {
    font-size: 12px;
    color: var(--alice-silver);
    line-height: 1.4;
    font-family: 'Fira Code', monospace;
}

.rh-event-preview-time {
    color: var(--matrix-green);
    font-weight: 500;
    margin-bottom: 5px;
}

.rh-event-preview-category {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(138, 43, 226, 0.3);
    border-radius: 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Event Modal */
.rh-event-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.rh-event-modal.active {
    opacity: 1;
    visibility: visible;
}

.rh-event-modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    display: flex;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.rh-event-modal.active .rh-event-modal-content {
    transform: scale(1);
}

.rh-event-modal-image {
    flex: 0 0 300px;
    height: 400px;
    object-fit: cover;
}

.rh-event-modal-info {
    flex: 1;
    padding: 30px;
    color: var(--alice-silver);
}

.rh-event-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(255, 0, 64, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.rh-event-modal-close:hover {
    background: var(--alice-red);
    transform: scale(1.1);
}

.rh-event-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--alice-gold);
    margin-bottom: 15px;
    font-family: 'Cinzel', serif;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.rh-event-modal-meta {
    margin-bottom: 20px;
    font-family: 'Fira Code', monospace;
}

.rh-event-modal-date,
.rh-event-modal-time,
.rh-event-modal-category {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.rh-event-modal-date {
    color: var(--alice-gold);
    font-weight: 600;
}

.rh-event-modal-time {
    color: var(--matrix-green);
    font-weight: 500;
}

.rh-event-modal-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(138, 43, 226, 0.3);
    border-radius: 15px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rh-event-modal-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--alice-silver);
    font-family: 'Cinzel', serif;
}

/* Event List Styles */
.rh-event-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rh-event-list .rh-event-item {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    border-left: 4px solid var(--alice-gold);
    box-shadow: 0 8px 32px var(--glass-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.rh-event-list .rh-event-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

/* Upcoming Events Widget */
.rh-upcoming-events {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
}

.rh-upcoming-events h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: var(--alice-gold);
    font-family: 'Cinzel', serif;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.rh-upcoming-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rh-upcoming-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
    border-left: 3px solid var(--alice-gold);
    padding-left: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.rh-upcoming-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--matrix-green);
    transform: translateX(5px);
}

.rh-upcoming-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.rh-upcoming-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--alice-gold);
    min-width: 80px;
    font-family: 'Fira Code', monospace;
}

.rh-upcoming-time {
    display: block;
    font-size: 12px;
    color: var(--matrix-green);
    font-weight: normal;
}

.rh-upcoming-title {
    flex: 1;
    font-size: 14px;
    color: var(--alice-silver);
    font-family: 'Cinzel', serif;
}

/* No Events Message */
.rh-no-events {
    text-align: center;
    padding: 60px;
    color: var(--alice-silver);
    font-style: italic;
    font-size: 18px;
    font-family: 'Cinzel', serif;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

/* Matrix Rain Effect (Optional) */
.rh-matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.1;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .rh-calendar-header {
        padding: 20px;
    }
    
    .rh-calendar-header h3 {
        font-size: 24px;
    }
    
    .rh-calendar-day {
        min-height: 80px;
        padding: 8px;
    }
    
    .rh-event-item {
        font-size: 10px;
        padding: 6px 8px;
    }
    
    .rh-event-modal-content {
        flex-direction: column;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .rh-event-modal-image {
        flex: none;
        height: 200px;
        width: 100%;
    }
    
    .rh-event-modal-info {
        padding: 20px;
    }
    
    .rh-event-list .rh-event-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media screen and (max-width: 480px) {
    .rh-calendar-grid {
        font-size: 12px;
    }
    
    .rh-calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .rh-day-number {
        font-size: 12px;
    }
    
    .rh-event-item {
        display: none;
    }
    
    .rh-calendar-day.rh-has-events::after {
        content: '';
        position: absolute;
        bottom: 4px;
        right: 4px;
        width: 8px;
        height: 8px;
        background: var(--matrix-green);
        border-radius: 50%;
        box-shadow: 0 0 10px var(--matrix-green);
    }
}

/* Print Styles */
@media print {
    .rh-calendar-nav,
    .rh-event-modal {
        display: none;
    }
    
    .rh-event-item {
        box-shadow: none;
        border: 1px solid #ddd;
        background: white;
        color: black;
    }
    
    .rh-calendar-day {
        border: 1px solid #ddd;
        background: white;
    }
    
    .rh-calendar-header {
        background: white;
        color: black;
    }
}

/* Animation Keyframes */
@keyframes matrix-glow {
    0%, 100% { text-shadow: 0 0 5px var(--matrix-green); }
    50% { text-shadow: 0 0 20px var(--matrix-green), 0 0 30px var(--matrix-green); }
}

@keyframes alice-shimmer {
    0% { text-shadow: 0 0 10px var(--alice-gold); }
    50% { text-shadow: 0 0 20px var(--alice-gold), 0 0 30px var(--alice-gold); }
    100% { text-shadow: 0 0 10px var(--alice-gold); }
}

.rh-calendar-header h3 {
    animation: alice-shimmer 3s ease-in-out infinite;
}

.rh-event-item:hover .rh-event-title {
    animation: matrix-glow 1s ease-in-out infinite;
}