/* Custom Timeline Styles for Tailwind Integration */
.timeline-container {
    @apply bg-white/90 backdrop-blur-sm border border-gray-200/50 rounded-2xl shadow-xl relative overflow-hidden;
    min-height: 650px;
}

.timeline-controls {
    @apply bg-gradient-to-r from-gray-50 to-blue-50 p-6 border-b-2 border-gray-200 flex justify-between items-center flex-wrap gap-4;
}

.timeline-scroll-container {
    @apply overflow-auto bg-gray-50/50;
    height: calc(100vh - 300px);
    min-height: 500px;
}

.timeline-grid {
    @apply grid relative bg-white;
    grid-template-columns: 80px 1fr;
    grid-template-rows: 40px repeat(288, 30px);
    min-width: 100%;
    max-height: calc(100vh - 200px);
}

.timeline-header {
    @apply bg-gradient-to-r from-gray-700 to-gray-800 text-white border border-gray-600 flex items-center justify-center font-semibold text-xs sticky top-0 z-15;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.timeline-header.timeline-corner {
    @apply bg-gradient-to-r from-blue-600 to-indigo-600 text-sm font-bold z-20;
    grid-column: 1 / 3;
    grid-row: 1;
}

.timeline-hour-label {
    @apply bg-gradient-to-r from-gray-600 to-gray-700 text-white border border-gray-600 flex items-center justify-center font-bold text-xs sticky left-0 z-10;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.timeline-slot {
    @apply border-b border-gray-200 relative transition-all duration-200 cursor-pointer;
    min-height: 40px;
}

.timeline-slot:hover {
    @apply bg-blue-50;
}

.timeline-slot.quarter-hour {
    @apply border-gray-300;
}

.timeline-slot.half-hour {
    @apply border-b-2 border-gray-300 bg-gray-50;
}

.timeline-slot.hour-mark {
    @apply border-b-2 border-gray-400 bg-gray-100;
}

.timeline-slot.occupied {
    @apply bg-yellow-50 border-yellow-200;
}

.timeline-slot.drop-zone-active {
    @apply bg-gradient-to-r from-green-100 to-green-200 border-4 border-dashed border-green-500;
    animation: pulse-green 0.8s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.program-block {
    @apply absolute bg-gradient-to-r from-blue-500 to-purple-600 text-white rounded-lg p-3 shadow-lg hover:shadow-xl transition-all duration-300 cursor-grab border-2 border-white/30;
    z-index: 10;
}

.program-block:hover {
    @apply shadow-2xl;
    transform: translateY(-1px);
}

.program-block:active {
    @apply cursor-grabbing;
    transform: scale(0.98);
}

.program-block .program-title {
    @apply font-bold text-xs leading-tight mb-1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.program-block .program-session {
    @apply text-xs opacity-90 leading-tight bg-white/10 px-2 py-1 rounded mb-1;
}

.program-block .program-time {
    @apply text-xs opacity-90 mt-auto font-medium bg-white/10 px-2 py-1 rounded text-center;
}

.program-block .remove-btn {
    @apply absolute top-2 right-2 bg-red-500/80 hover:bg-red-600 text-white p-1 rounded-full text-xs transition-all duration-200;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-item {
    @apply bg-gradient-to-r from-emerald-500 to-green-500 text-white p-3 rounded-xl cursor-grab transition-all duration-300 shadow-lg hover:shadow-xl border-2 border-white/20;
}

.program-item:hover {
    @apply bg-gradient-to-r from-emerald-600 to-green-600;
    transform: translateY(-2px) scale(1.02);
}

.program-item:active {
    @apply cursor-grabbing;
    transform: scale(0.95);
}

.program-item .program-name {
    @apply font-bold text-sm mb-1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.program-item .program-duration {
    @apply text-xs opacity-90 bg-white/20 px-2 py-1 rounded;
}

.flatpickr-input {
    @apply bg-gradient-to-r from-white to-gray-50 border-2 border-gray-300 rounded-lg px-4 py-2 font-medium text-gray-700 transition-all duration-300;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.flatpickr-input:hover {
    @apply border-blue-500;
    box-shadow: 0 4px 8px rgba(59,130,246,0.2);
}

.flatpickr-input:focus {
    @apply border-blue-500 outline-none;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.video-item {
    @apply bg-gradient-to-r from-gray-50 to-gray-100 border border-gray-200 rounded-xl p-4 mb-3 transition-all duration-300 hover:shadow-lg hover:border-gray-300 cursor-grab;
}

.video-item:active {
    @apply cursor-grabbing;
    transform: scale(0.98);
}

.video-item.dragging {
    @apply opacity-50 transform scale-95;
}

.video-item.drag-over {
    @apply border-blue-500 border-2 bg-blue-50;
    transform: translateY(-2px);
}

.video-controls {
    @apply flex gap-3 items-center mt-3 flex-wrap;
}

.video-controls input {
    @apply w-20 px-3 py-1 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.sessao-item {
    @apply bg-gradient-to-r from-gray-50 to-gray-100 border border-gray-200 rounded-xl p-3 mb-3 cursor-pointer transition-all duration-300 hover:bg-gradient-to-r hover:from-blue-50 hover:to-blue-100 hover:border-blue-300;
}

.sessao-item.selected {
    @apply bg-gradient-to-r from-blue-100 to-blue-200 border-blue-400;
}

.live-timeline {
    @apply h-80 bg-gray-50 border border-gray-200 rounded-lg relative overflow-y-auto;
}

.live-pointer {
    @apply absolute top-0 left-0 w-0.5 h-full bg-red-500 z-10 transition-all duration-500;
}

.timeline-program {
    @apply bg-blue-500 text-white px-3 py-2 my-1 rounded text-xs;
}

.current-program {
    @apply bg-green-500;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

#youtube-player {
    @apply w-full bg-black rounded-lg flex items-center justify-center text-white;
    height: 400px;
}

.status-indicator {
    @apply inline-block w-2.5 h-2.5 rounded-full mr-2;
}

.status-live {
    @apply bg-green-500;
    animation: pulse 1s infinite;
}

.status-offline {
    @apply bg-red-500;
}

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

.zoom-btn {
    @apply bg-gradient-to-r from-gray-600 to-gray-700 text-white border-none px-4 py-2 rounded-lg cursor-pointer text-xs font-medium transition-all duration-300;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.zoom-btn:hover {
    @apply bg-gradient-to-r from-gray-700 to-gray-800;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.zoom-btn.active {
    @apply bg-gradient-to-r from-blue-500 to-blue-600;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.nav-date-btn {
    @apply bg-gradient-to-r from-blue-500 to-blue-600 text-white border-none px-3 py-2 rounded-lg cursor-pointer text-sm font-medium transition-all duration-300;
    box-shadow: 0 2px 6px rgba(59,130,246,0.3);
}

.nav-date-btn:hover {
    @apply bg-gradient-to-r from-blue-600 to-blue-700;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(59,130,246,0.4);
}

.nav-date-btn:active {
    transform: translateY(0);
}

/* Responsive styles */
@media (max-width: 1200px) {
    .timeline-grid {
        grid-template-columns: 70px 1fr;
        grid-template-rows: 35px repeat(288, 25px);
    }
    
    .timeline-scroll-container {
        height: calc(100vh - 350px);
    }
}

@media (max-width: 768px) {
    .timeline-controls {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .timeline-grid {
        grid-template-columns: 60px 1fr;
        grid-template-rows: 30px repeat(288, 22px);
    }
    
    .timeline-header,
    .timeline-hour-label {
        font-size: 9px;
    }
    
    .program-block {
        padding: 4px 6px;
        margin: 1px 2px;
    }
    
    .program-block .program-title {
        font-size: 10px;
    }
    
    .program-block .program-session {
        font-size: 9px;
    }
    
    .program-item {
        min-width: 120px;
        font-size: 12px;
        margin: 6px 4px;
        padding: 12px 15px;
    }
    
    .timeline-scroll-container {
        height: calc(100vh - 400px);
        min-height: 400px;
    }
    
    .timeline-date-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .timeline-navigation {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .flatpickr-input {
        min-width: 150px;
    }
    
    .nav-date-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}