/* Modern Timetable Styles tanpa Jarak */
.radio-schedule-timetable {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Pulsating animation untuk program sedang berlangsung */
.pulsating {
    animation: pulsate 2s ease-in-out infinite alternate;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
    position: relative;
    z-index: 2;
}

@keyframes pulsate {
    0% {
        box-shadow: 0 0 5px rgba(255, 71, 87, 0.5);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 71, 87, 0.8);
        transform: scale(1.02);
    }
}

/* Current Program Section */
.timetable-current-program {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.current-program-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.current-program-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #ff4757;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.live-text {
    font-size: 11px;
    font-weight: 600;
}

.current-program-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
}

.program-info .program-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.program-time,
.program-host {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
}

/* Timetable Layout - TANPA JARAK */
.timetable-container {
    padding: 0;
}

.timetable-time-range {
    background: #f8f9fa;
    padding: 10px 20px;
    border-bottom: 1px solid #e9ecef;
}

.time-range-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
}

.time-range-info .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* HEADER - TANPA JARAK */
.timetable-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}

.time-column-header,
.day-column-header {
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-right: 1px solid #5a6578;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-column-header {
    position: relative;
    flex-direction: column;
    gap: 4px;
}

.day-column-header:last-child {
    border-right: none;
}

.today-badge {
    background: #ff4757;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
}

/* BODY - TANPA JARAK */
.timetable-body {
    background: #ffffff;
}

.timetable-row {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    min-height: 50px;
}

.timetable-row:last-child {
    border-bottom: none;
}

.timetable-row.current-time-slot {
    background: #e3f2fd;
}

.timetable-row.current-time-slot .time-slot {
    background: #2196f3;
    color: white;
    font-weight: 700;
}

.time-slot {
    position: relative;
    background: white;
    padding: 8px 6px;
    text-align: center;
    font-weight: 600;
    color: #4a5568;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-right: 1px solid #e2e8f0;
}

.day-slot {
    background: white;
    position: relative;
    border-right: 1px solid #e2e8f0;
    min-height: 50px;
}

.day-slot:last-child {
    border-right: none;
}

.empty-slot {
    background: #fafafa;
    height: 100%;
    width: 100%;
}

.program-slot {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px 4px;
    color: white;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
    border: none;
}

/* Merge cell styles berdasarkan rowspan */
.program-slot[data-rowspan="1"] {
    height: 100%;
}

.program-slot[data-rowspan="2"] {
    height: 200%;
    z-index: 2;
}

.program-slot[data-rowspan="3"] {
    height: 300%;
    z-index: 2;
}

.program-slot[data-rowspan="4"] {
    height: 400%;
    z-index: 2;
}

.program-slot[data-rowspan="5"] {
    height: 500%;
    z-index: 2;
}

.program-slot[data-rowspan="6"] {
    height: 600%;
    z-index: 2;
}

.program-slot:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.current-indicator {
    width: 5px;
    height: 5px;
    background: #ff4757;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    right: 3px;
    animation: pulse 2s infinite;
}

.program-title {
    line-height: 1.1;
    word-break: break-word;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
    margin-bottom: 1px;
    font-size: 9px;
    font-weight: 700;
}

.program-time-small {
    font-size: 7px;
    opacity: 0.9;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
    margin-bottom: 1px;
    line-height: 1;
}

.program-host-small {
    font-size: 7px;
    opacity: 0.8;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
    font-style: italic;
    line-height: 1;
}

.current-time-indicator {
    width: 6px;
    height: 6px;
    background: #2196f3;
    border-radius: 50%;
    border: 1px solid #fff;
    box-shadow: 0 0 0 1px #2196f3;
}

/* Timetable Legend */
.timetable-legend {
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 15px;
}

.legend-title {
    font-weight: 600;
    color: #4a5568;
    font-size: 13px;
}

.legend-items {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #718096;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-color.current-indicator {
    animation: pulse 2s infinite;
}

.legend-color.current-time-indicator {
    background: #2196f3;
    border: 1px solid #fff;
    box-shadow: 0 0 0 1px #2196f3;
}

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

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.close-modal {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    padding: 8px 12px;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: #000;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.modal-body {
    padding: 15px;
}

.program-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
}

.detail-item .dashicons {
    color: #667eea;
    font-size: 14px;
    width: 14px;
}

/* Responsive Design - TANPA JARAK */
@media (max-width: 1200px) {
    .timetable-header,
    .timetable-row {
        grid-template-columns: 60px repeat(7, 1fr);
    }
    
    .time-slot {
        font-size: 11px;
        padding: 6px 4px;
    }
    
    .time-column-header,
    .day-column-header {
        padding: 10px 6px;
        font-size: 10px;
    }
    
    .program-slot {
        font-size: 9px;
        padding: 4px 3px;
    }
    
    .program-title {
        font-size: 8px;
    }
}

@media (max-width: 768px) {
    .timetable-header,
    .timetable-row {
        grid-template-columns: 50px repeat(7, 1fr);
    }
    
    .time-slot {
        font-size: 10px;
        padding: 5px 3px;
    }
    
    .time-column-header,
    .day-column-header {
        padding: 8px 4px;
        font-size: 9px;
    }
    
    .day-column-header {
        gap: 2px;
    }
    
    .today-badge {
        font-size: 8px;
        padding: 1px 4px;
    }
    
    .program-slot {
        font-size: 8px;
        padding: 3px 2px;
    }
    
    .program-title {
        font-size: 7px;
    }
    
    .program-time-small,
    .program-host-small {
        font-size: 6px;
    }
    
    .timetable-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 15px;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 6px;
    }
    
    .time-range-info {
        font-size: 12px;
    }
    
    .legend-item {
        font-size: 10px;
    }
    
    .current-program-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .current-program-header h3 {
        font-size: 14px;
    }
    
    .live-indicator {
        padding: 3px 6px;
    }
    
    .live-text {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .timetable-header,
    .timetable-row {
        grid-template-columns: 40px repeat(7, 1fr);
    }
    
    .time-slot {
        font-size: 9px;
        padding: 4px 2px;
    }
    
    .time-column-header,
    .day-column-header {
        padding: 6px 2px;
        font-size: 8px;
    }
    
    .program-slot {
        font-size: 7px;
        padding: 2px 1px;
    }
    
    .program-title {
        font-size: 6px;
    }
    
    .program-time-small,
    .program-host-small {
        font-size: 5px;
    }
    
    .timetable-current-program {
        padding: 15px;
    }
    
    .current-program-content {
        padding: 10px;
    }
    
    .program-info .program-title {
        font-size: 14px;
    }
    
    .program-time,
    .program-host {
        font-size: 12px;
    }
}