/* CPS Calendar Module - Main Styles */
.cps-calendar {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* Loading State */
.cps-calendar-loading {
    text-align: center;
    padding: 60px 20px;
}

.bowling-ball-loader {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    position: relative;
    animation: roll 2s linear infinite;
}

.bowling-ball-loader::before,
.bowling-ball-loader::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    top: 15px;
}

.bowling-ball-loader::before { left: 20px; }
.bowling-ball-loader::after { right: 20px; }

@keyframes roll {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error State */
.cps-calendar-error {
    text-align: center;
    padding: 40px 20px;
    color: #e67c73;
    font-weight: 600;
}

/* Month Separator */
.month-separator {
    font-size: 4rem;
    font-weight: 900;
    color: #667eea;
    text-align: center;
    margin: 60px 0 40px 0;
    letter-spacing: 6px;
    text-transform: uppercase;
    position: relative;
    padding: 20px 0;
    text-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.month-separator::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 200px;
    height: 8px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    box-shadow: 0 2px 15px rgba(102, 126, 234, 0.6);
}

/* Calendar Grid */
.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* EVENT CARDS */
.calendar-event {
    position: relative;
    border-radius: 20px;
    padding: 0;
    min-height: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    color: var(--event-text);
}

/* Google Calendar COLOR */
.calendar-event::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--event-bg);
    z-index: 0;
}

.calendar-event:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

/* SOPHISTICATED SVG ANIMATIONS - PREMIUM & ELEGANT */
.event-svg-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

/* COLOR 1 - LAVENDER - Elegant Particle Streams */
[data-color-id="1"] .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cdefs%3E%3CradialGradient id='g1'%3E%3Cstop offset='0%25' stop-color='white' stop-opacity='1'/%3E%3Cstop offset='100%25' stop-color='white' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='100' cy='40' r='8' fill='url(%23g1)'%3E%3Canimate attributeName='cx' values='100;1100' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0;1;1;0' dur='8s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='150' cy='80' r='6' fill='url(%23g1)'%3E%3Canimate attributeName='cx' values='150;1150' dur='7s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0;1;1;0' dur='7s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='80' cy='120' r='7' fill='url(%23g1)'%3E%3Canimate attributeName='cx' values='80;1080' dur='9s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0;1;1;0' dur='9s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='120' cy='160' r='5' fill='url(%23g1)'%3E%3Canimate attributeName='cx' values='120;1120' dur='10s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0;1;1;0' dur='10s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
}

/* COLOR 2 - GREEN - Flowing Energy Waves */
[data-color-id="2"] .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cpath d='M0,100 Q300,50 600,100 T1200,100' fill='none' stroke='white' stroke-width='3' opacity='0.6'%3E%3Canimate attributeName='d' values='M0,100 Q300,50 600,100 T1200,100;M0,100 Q300,150 600,100 T1200,100;M0,100 Q300,50 600,100 T1200,100' dur='6s' repeatCount='indefinite'/%3E%3C/path%3E%3Cpath d='M0,110 Q300,60 600,110 T1200,110' fill='none' stroke='white' stroke-width='2.5' opacity='0.5'%3E%3Canimate attributeName='d' values='M0,110 Q300,60 600,110 T1200,110;M0,110 Q300,160 600,110 T1200,110;M0,110 Q300,60 600,110 T1200,110' dur='7s' repeatCount='indefinite'/%3E%3C/path%3E%3Cpath d='M0,90 Q300,40 600,90 T1200,90' fill='none' stroke='white' stroke-width='2' opacity='0.4'%3E%3Canimate attributeName='d' values='M0,90 Q300,40 600,90 T1200,90;M0,90 Q300,140 600,90 T1200,90;M0,90 Q300,40 600,90 T1200,90' dur='8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
}

/* COLOR 3 - PURPLE - Radial Pulse Burst */
[data-color-id="3"] .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cdefs%3E%3CradialGradient id='burst'%3E%3Cstop offset='0%25' stop-color='white' stop-opacity='0.8'/%3E%3Cstop offset='100%25' stop-color='white' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='600' cy='100' r='50' fill='none' stroke='white' stroke-width='2'%3E%3Canimate attributeName='r' values='50;180' dur='4s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.8;0' dur='4s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='600' cy='100' r='40' fill='none' stroke='white' stroke-width='2.5'%3E%3Canimate attributeName='r' values='40;160' dur='4s' begin='0.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.8;0' dur='4s' begin='0.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='600' cy='100' r='30' fill='none' stroke='white' stroke-width='3'%3E%3Canimate attributeName='r' values='30;140' dur='4s' begin='1s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.8;0' dur='4s' begin='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
}

/* COLOR 4 - PINK/RED - Dynamic Diagonal Sweep */
[data-color-id="4"] .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cdefs%3E%3ClinearGradient id='sweep' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='white' stop-opacity='0'/%3E%3Cstop offset='50%25' stop-color='white' stop-opacity='0.8'/%3E%3Cstop offset='100%25' stop-color='white' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpolygon points='0,0 200,0 100,200 -100,200' fill='url(%23sweep)'%3E%3CanimateTransform attributeName='transform' type='translate' from='-200,0' to='1400,0' dur='5s' repeatCount='indefinite'/%3E%3C/polygon%3E%3C/svg%3E");
}

/* COLOR 5 - YELLOW - Geometric Grid Flow */
[data-color-id="5"] .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cg opacity='0.6'%3E%3Crect x='0' y='80' width='100' height='40' fill='white'%3E%3Canimate attributeName='x' values='0;1200' dur='4s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0;0.7;0' dur='4s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='-200' y='80' width='80' height='40' fill='white'%3E%3Canimate attributeName='x' values='-200;1200' dur='5s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0;0.6;0' dur='5s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='-400' y='80' width='120' height='40' fill='white'%3E%3Canimate attributeName='x' values='-400;1200' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0;0.5;0' dur='6s' repeatCount='indefinite'/%3E%3C/rect%3E%3C/g%3E%3C/svg%3E");
}

/* COLOR 6 - ORANGE - Flowing Ribbons */
[data-color-id="6"] .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cpath d='M-100,80 Q200,40 500,80 T1100,80 L1100,120 Q800,160 500,120 T-100,120 Z' fill='white' opacity='0.5'%3E%3CanimateTransform attributeName='transform' type='translate' from='0,0' to='600,0' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.3;0.6;0.3' dur='4s' repeatCount='indefinite'/%3E%3C/path%3E%3Cpath d='M-100,90 Q200,50 500,90 T1100,90 L1100,110 Q800,150 500,110 T-100,110 Z' fill='white' opacity='0.4'%3E%3CanimateTransform attributeName='transform' type='translate' from='0,0' to='400,0' dur='10s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.2;0.5;0.2' dur='5s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
}

/* COLOR 7 - BLUE - Liquid Motion */
[data-color-id="7"] .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cellipse cx='300' cy='100' rx='150' ry='60' fill='white' opacity='0.3'%3E%3Canimate attributeName='rx' values='150;200;150' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='ry' values='60;80;60' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.3;0.5;0.3' dur='6s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='700' cy='100' rx='180' ry='70' fill='white' opacity='0.25'%3E%3Canimate attributeName='rx' values='180;220;180' dur='7s' repeatCount='indefinite'/%3E%3Canimate attributeName='ry' values='70;90;70' dur='7s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.25;0.45;0.25' dur='7s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3C/svg%3E");
}

/* COLOR 8 - GRAY - Minimalist Pulse */
[data-color-id="8"] .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Ccircle cx='600' cy='100' r='80' fill='white' opacity='0.3'%3E%3Canimate attributeName='r' values='80;120;80' dur='5s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.3;0.6;0.3' dur='5s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='600' cy='100' r='60' fill='white' opacity='0.2'%3E%3Canimate attributeName='r' values='60;100;60' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.2;0.5;0.2' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
}

/* COLOR 9 - INDIGO - Angular Geometry */
[data-color-id="9"] .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cg transform-origin='600 100' opacity='0.5'%3E%3Cpolygon points='600,30 700,100 600,170 500,100' fill='white'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 600 100' to='360 600 100' dur='12s' repeatCount='indefinite'/%3E%3C/polygon%3E%3Cpolygon points='600,50 680,100 600,150 520,100' fill='none' stroke='white' stroke-width='2'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 600 100' to='-360 600 100' dur='10s' repeatCount='indefinite'/%3E%3C/polygon%3E%3C/g%3E%3C/svg%3E");
}

/* COLOR 10 - DARK GREEN - Vertical Rhythm */
[data-color-id="10"] .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cg%3E%3Crect x='200' y='60' width='4' height='80' fill='white' opacity='0.5'%3E%3Canimate attributeName='height' values='80;120;80' dur='3s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='60;40;60' dur='3s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='400' y='70' width='4' height='60' fill='white' opacity='0.5'%3E%3Canimate attributeName='height' values='60;110;60' dur='3.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='70;45;70' dur='3.5s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='600' y='65' width='4' height='70' fill='white' opacity='0.5'%3E%3Canimate attributeName='height' values='70;115;70' dur='4s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='65;42;65' dur='4s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='800' y='75' width='4' height='50' fill='white' opacity='0.5'%3E%3Canimate attributeName='height' values='50;100;50' dur='3.2s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='75;50;75' dur='3.2s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='1000' y='80' width='4' height='40' fill='white' opacity='0.5'%3E%3Canimate attributeName='height' values='40;90;40' dur='3.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='80;55;80' dur='3.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3C/g%3E%3C/svg%3E");
}

/* COLOR 11 - RED - Speed Blur */
[data-color-id="11"] .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cdefs%3E%3ClinearGradient id='blur'%3E%3Cstop offset='0%25' stop-color='white' stop-opacity='0'/%3E%3Cstop offset='30%25' stop-color='white' stop-opacity='0.7'/%3E%3Cstop offset='100%25' stop-color='white' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='70' width='300' height='10' fill='url(%23blur)' rx='5'%3E%3CanimateTransform attributeName='transform' type='translate' from='-300,0' to='1200,0' dur='2s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='0' y='100' width='400' height='8' fill='url(%23blur)' rx='4'%3E%3CanimateTransform attributeName='transform' type='translate' from='-400,0' to='1200,0' dur='2.5s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='0' y='130' width='250' height='6' fill='url(%23blur)' rx='3'%3E%3CanimateTransform attributeName='transform' type='translate' from='-250,0' to='1200,0' dur='3s' repeatCount='indefinite'/%3E%3C/rect%3E%3C/svg%3E");
}

/* DEFAULT - Floating Orbs */
[data-color-id="undefined"] .event-svg-bg,
.calendar-event:not([data-color-id]) .event-svg-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cdefs%3E%3CradialGradient id='orb'%3E%3Cstop offset='0%25' stop-color='white' stop-opacity='0.6'/%3E%3Cstop offset='100%25' stop-color='white' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='300' cy='100' r='40' fill='url(%23orb)'%3E%3Canimate attributeName='cy' values='100;60;100' dur='5s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.5;0.8;0.5' dur='5s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='700' cy='100' r='35' fill='url(%23orb)'%3E%3Canimate attributeName='cy' values='100;140;100' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.5;0.8;0.5' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='1000' cy='100' r='30' fill='url(%23orb)'%3E%3Canimate attributeName='cy' values='100;80;100' dur='5.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.5;0.8;0.5' dur='5.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
}

/* EVENT CONTENT */
.event-content {
    position: relative;
    z-index: 5;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-date {
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.event-date-location {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.event-title {
    flex: 1;
}

.event-location {
    font-size: 1.1rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-location svg {
    flex-shrink: 0;
}

.event-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
}

.action-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.action-icon:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
}

.action-icon-calendar {
    font-size: 1.4rem;
}

/* Empty State */
.calendar-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .month-separator {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .month-separator::after {
        width: 120px;
        height: 6px;
    }
    
    .event-title {
        font-size: 1.5rem;
    }
    
    .event-content {
        padding: 20px;
    }
}

/* Location Link Hover Effect */
.event-location a {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 4px 8px;
    margin: -4px -8px;
}

.event-location a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(3px);
    text-decoration: underline;
}

.event-location a:hover svg {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* STICKY EVENTS SECTION */
.sticky-section {
    margin-bottom: 50px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.sticky-header {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.sticky-header::before {
    content: '⭐';
    margin-right: 15px;
    -webkit-text-fill-color: initial;
}

.sticky-header::after {
    content: '⭐';
    margin-left: 15px;
    -webkit-text-fill-color: initial;
}

.sticky-section .calendar-event {
    border: 3px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.2);
}

.sticky-section .calendar-event:hover {
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.3);
}

@media (max-width: 768px) {
    .sticky-header {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .sticky-section {
        padding: 20px;
        margin-bottom: 30px;
    }
}