/* Google Calendar Events Styles - Matching Oblee Music Design */

.calendar-events-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 20px 0;
}

/* View Toggle Buttons */
.calendar-view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.view-btn {
    background-color: var(--green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.view-btn:hover {
    background-color: var(--green-dark);
}

.view-btn.active {
    background-color: var(--green-dark);
    font-weight: bold;
}

/* List View Styles */
.calendar-list-view h3 {
    color: #444;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--green);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.event-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
    position: relative;
    overflow: visible !important;
    margin-top: 15px;
}

.event-item:hover {
    border-color: var(--green);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
    background: #fff;
}

.event-date-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.event-date {
    font-weight: bold;
    color: var(--green);
    font-size: 14px;
}

.event-time {
    color: #666;
    font-size: 13px;
}

.local-time {
    color: #888;
    font-size: 12px;
    font-style: italic;
}

.event-title {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.event-location {
    margin: 5px 0;
    color: #666;
    font-size: 13px;
}

.event-description {
    margin: 8px 0 0 0;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.event-description u {
    text-decoration: none;
}

.no-events {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Calendar Grid View Styles */
.calendar-grid-view h3 {
    color: #444;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--green);
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.nav-btn {
    background-color: var(--green);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background-color: var(--green-dark);
}

#current-month-year {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.calendar-grid {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: var(--green);
    color: white;
}

.day-header {
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 80px;
    border: 1px solid #eee;
    padding: 8px;
    position: relative;
    background: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-day.other-month {
    background-color: #f5f5f5;
    color: #999;
}

.calendar-day.has-events {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: var(--green);
}

.calendar-day.has-events:hover {
    background-color: rgba(40, 167, 69, 0.2);
}

.calendar-day.today {
    background-color: rgba(255, 193, 7, 0.2);
    border: 2px solid #ffc107;
    font-weight: bold;
}

.calendar-day.today .day-number {
    color: #856404;
    font-weight: bold;
}

.calendar-day.today:hover {
    background-color: rgba(255, 193, 7, 0.3);
}

/* Today's date with events - combine both styles */
.calendar-day.today.has-events {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.3) 0%, rgba(40, 167, 69, 0.2) 100%);
    border: 2px solid #ffc107;
}

.calendar-day.today.has-events:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.4) 0%, rgba(40, 167, 69, 0.3) 100%);
}

.day-number {
    font-weight: bold;
    margin-bottom: 4px;
}

.day-events {
    font-size: 11px;
    color: var(--green);
}

.event-dot {
    width: 6px;
    height: 6px;
    background-color: var(--green);
    border-radius: 50%;
    display: inline-block;
    margin: 1px;
}

/* Event Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    border: none;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 10px;
    margin: -10px -10px 0 0;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
    color: var(--green);
}

.modal-event-title {
    color: var(--green);
    margin-bottom: 15px;
    font-size: 20px;
}

.modal-event-time {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid var(--green);
}

.modal-event-location {
    margin-bottom: 15px;
    color: #666;
}

.modal-event-description {
    line-height: 1.6;
    color: #333;
}

/* Modal event styling to match list view */
.modal-event-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.modal-event-date {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    color: #333;
}

.modal-event-time {
    color: var(--green);
    font-weight: 500;
    font-size: 14px;
    margin: 10px 0;
    padding: 0;
    background: none;
    border: none;
}

.modal-event-title {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.modal-event-description {
    color: #666;
    line-height: 1.5;
    margin-top: 15px;
}

/* Multiple events modal styling */
.modal-event-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.modal-event-item:last-child {
    margin-bottom: 0;
}

.modal-event-item .modal-event-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.modal-event-item .modal-event-time {
    font-size: 13px;
    margin: 8px 0;
}

.modal-event-item:hover {
    border-color: var(--green);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
    background: #fff;
}

.modal-event-item .modal-event-description {
    margin: 8px 0 0 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Countdown Timer Styles */
.countdown-card {
    background: linear-gradient(135deg, #5c4033 0%, #3d2b1f 50%, #2d2d2d 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0 50px 0 !important;
    color: #fad98c;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(250, 217, 140, 0.2);
}

.countdown-header h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
}

.countdown-event-title {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* Elapsed Timer Styles */
#elapsed-timer {
    font-size: 18px;
    font-weight: bold;
    margin: 15px 0;
    color: #fad98c;
}

#elapsed-display {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    color: #fff;
    text-shadow: 0 0 10px rgba(250, 217, 140, 0.5);
}

/* Stream Player Styles */
.stream-player {
    margin-top: 20px;
    padding: 15px;
    background: rgba(250, 217, 140, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(250, 217, 140, 0.2);
}

.stream-player h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #fad98c;
    text-shadow: 0 0 5px rgba(250, 217, 140, 0.3);
}

.stream-player audio {
    width: 100%;
    margin-top: 10px;
}

.stream-offline {
    margin-top: 15px;
    padding: 10px;
    color: #ccc;
    font-style: italic;
    font-size: 14px;
}

.stream-live-notice {
    margin-top: 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.15), rgba(255, 100, 100, 0.1));
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 8px;
    color: #ff6b6b;
    font-weight: 600;
    font-size: 14px;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 68, 68, 0.2); }
    50% { box-shadow: 0 0 15px rgba(255, 68, 68, 0.4); }
}

/* Event Attachments Styles */
.event-attachments {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.event-image {
    margin: 10px 0;
}

.event-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-file {
    margin: 8px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.event-file a {
    color: var(--green);
    text-decoration: none;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: inline-block;
    max-width: 100%;
}

.event-file a:hover {
    text-decoration: underline;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.countdown-number {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

.countdown-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.countdown-status {
    margin-top: 15px;
}

.in-progress-label {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-item.in-progress {
    border: 2px solid #90ee90;
    background: rgba(144, 238, 144, 0.3);
    position: relative;
}

/* Removed ::before pseudo-element that was creating duplicate label */

.event-item.next-show {
    border: 2px solid #f0e68c !important;
    background: rgba(240, 230, 140, 0.3) !important;
    box-shadow: 0 2px 8px rgba(240, 230, 140, 0.4) !important;
}

.event-item.starting-soon {
    border: 2px solid #ffa500 !important;
    background: rgba(255, 165, 0, 0.2) !important;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3) !important;
}

.event-item.in-progress {
    border: 2px solid #90ee90 !important;
    background: rgba(144, 238, 144, 0.3) !important;
    box-shadow: 0 2px 8px rgba(144, 238, 144, 0.4) !important;
}

/* Event status labels - Force styles with !important */

.event-status-label {
    position: absolute !important;
    top: -12px !important;
    left: 10px !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
    display: block !important;
    visibility: visible !important;
}

.event-status-label.upcoming-label {
    background: #d4c41a !important;
    color: #333 !important;
    border: 2px solid #f0e68c !important;
}

.event-status-label.starting-soon-label {
    background: #cc7a00 !important;
    color: white !important;
    border: 2px solid #ffa500 !important;
}

.event-status-label.in-progress-label {
    background: #5cb85c !important;
    color: white !important;
    border: 2px solid #90ee90 !important;
}

/* Error Styles */
.calendar-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-events-container {
        margin: 10px;
        padding: 15px;
    }
    
    .calendar-view-toggle {
        flex-direction: column;
        align-items: center;
    }
    
    .view-btn {
        width: 200px;
    }
    
    .event-date-time {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .calendar-nav {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .day-header {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .event-item {
        overflow: hidden;
    }
    
    .event-description {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        max-width: 100%;
    }
    
    .event-description a {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-all;
        display: inline-block;
        max-width: 100%;
    }
    
    .countdown-card {
        margin-bottom: 40px !important;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .calendar-days {
        font-size: 12px;
    }
    
    .calendar-day {
        min-height: 50px;
        padding: 2px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .day-events {
        font-size: 10px;
    }
}
