/* Mini Pomodoro Bar - CRITICAL FIX */
.minibar-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
    /* Başlangıçta görünür */
    opacity: 1;
    transform: translateX(0);
}

/* BAŞLANGIÇTA GİZLİ OLMAMALI - SADECE .hidden class varsa gizli */
.minibar-container:not(.hidden) {
    opacity: 1;
    transform: translateX(0);
}

.minibar-container.hidden {
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
}

.minibar {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    min-width: 140px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.minibar:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-color: #0d6efd;
}

.minibar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #6c757d;
    transition: background-color 0.3s ease;
}

.minibar.work::before {
    background: #dc3545;
}

.minibar.break::before {
    background: #28a745;
}

.minibar.completed::before {
    background: #ffc107;
}

.minibar-timer {
    font-size: 1.3rem;
    font-weight: 700;
    color: #212529;
    text-align: center;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.minibar-phase {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    color: #6c757d;
}

.minibar.work .minibar-phase {
    color: #dc3545;
}

.minibar.break .minibar-phase {
    color: #28a745;
}

/* KONTROLLER - SADECE HOVER'DA GÖSTER */
.minibar-controls {
    display: none;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.minibar:hover .minibar-controls {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* BUTONLAR - POINTER EVENTS OLSUN */
.minibar-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    color: #495057;
    pointer-events: auto !important; /* CRITICAL */
}

.minibar-btn:hover {
    background: #f8f9fa;
    transform: scale(1.1);
    border-color: #6c757d;
}

.minibar-btn:active {
    transform: scale(0.95);
}

.minibar-start:hover {
    color: #28a745;
    border-color: #28a745;
}

.minibar-pause:hover {
    color: #ffc107;
    border-color: #ffc107;
}

.minibar-reset:hover {
    color: #dc3545;
    border-color: #dc3545;
}

.minibar-close:hover {
    color: #6c757d;
    border-color: #6c757d;
}

.minibar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.minibar-btn:disabled:hover {
    background: white;
    border-color: #dee2e6;
    color: #495057;
}

/* Progress indicator */
.minibar-progress {
    width: 100%;
    height: 3px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.minibar-progress-bar {
    height: 100%;
    background: #6c757d;
    border-radius: 2px;
    transition: width 1s linear;
}

.minibar.work .minibar-progress-bar {
    background: #dc3545;
}

.minibar.break .minibar-progress-bar {
    background: #28a745;
}

/* Session info */
.minibar-session {
    font-size: 0.7rem;
    color: #6c757d;
    text-align: center;
    margin-top: 4px;
}

/* Pulse animation for active timer */
.minibar.pulse .minibar-timer {
    animation: pulse 1s infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .minibar-container {
        bottom: 10px;
        left: 10px;
    }
    
    .minibar {
        min-width: 120px;
        padding: 10px 12px;
    }
    
    .minibar-timer {
        font-size: 1.1rem;
    }
    
    .minibar-phase {
        font-size: 0.75rem;
    }
}

/* Focus states for accessibility */
.minibar-btn:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Notification dot for completed sessions */
.minibar-notification {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: ping 2s infinite;
    display: none;
}

@keyframes ping {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Tooltip for close button */
.minibar-tooltip {
    position: fixed;
    bottom: 80px;
    left: 20px;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    z-index: 1001;
    max-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* CRITICAL: Tüm minibar elementleri için pointer events */
.minibar-container:not(.hidden),
.minibar,
.minibar * {
    pointer-events: auto !important;
}