/* ==========================================
   POMODORO TIMER
   ========================================== */
.pomodoro-modal {
    max-width: 380px;
    text-align: center;
}

/* Mode bar */
.pomo-mode-bar {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.3rem;
    border-radius: 2rem;
    border: 1px solid var(--glass-border);
}

.pomo-mode-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.45rem 0.9rem;
    border-radius: 1.5rem;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.pomo-mode-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 10px var(--accent-glow);
}

/* SVG Ring */
.pomo-ring-wrap {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 1rem auto;
}

.pomo-ring {
    width: 260px;
    height: 260px;
    transform: rotate(-90deg);
}

.pomo-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 8;
}

.pomo-ring-fill {
    fill: none;
    stroke: #ef4444;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.29;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.4s ease;
}

.pomo-timer-display {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#pomoTime {
    font-size: 3.8rem;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
    background: linear-gradient(to right, #f8fafc, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pomo-mode-label {
    position: absolute;
    /* Move it closer to the timer */
    bottom: 60%; 
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    opacity: 0.8;
}

/* Controls */
.pomo-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pomo-ctrl-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    -webkit-text-fill-color: var(--text-secondary);
}

.pomo-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    -webkit-text-fill-color: white;
    transform: scale(1.08);
}

.pomo-main-btn {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: transparent;
    color: white;
    -webkit-text-fill-color: white;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.pomo-main-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #f87171, #ef4444);
}

/* Session counter */
.pomo-sessions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pomo-session-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pomo-session-dots {
    display: flex;
    gap: 0.5rem;
}

.pomo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.pomo-dot.filled {
    background: linear-gradient(135deg, #ef4444, #f97316);
    border-color: transparent;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.pomo-session-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pomo-tip {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ==========================================
   POMODORO SETTINGS ROW
   ========================================== */
.pomo-settings-row {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.pomo-setting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

.pomo-setting label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.pomo-setting-unit {
    font-weight: 400;
    opacity: 0.6;
}

.pomo-setting-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    padding: 0.4rem;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.pomo-setting-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
}

/* ==========================================
   FLOATING MINI TIMER
   ========================================== */
.pomo-mini-timer {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 8888;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid #ef4444;
    border-radius: 1rem;
    padding: 0.6rem 0.85rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(239, 68, 68, 0.1);
    animation: miniTimerSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.pomo-mini-timer[data-mode="short"] {
    border-left-color: #34d399;
}

.pomo-mini-timer[data-mode="long"] {
    border-left-color: #6366f1;
}

@keyframes miniTimerSlideIn {
    from {
        transform: translateX(120px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.pomo-mini-play,
.pomo-mini-open {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
    -webkit-text-fill-color: var(--text-secondary);
    flex-shrink: 0;
}

.pomo-mini-play {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    -webkit-text-fill-color: #f87171;
}

.pomo-mini-play:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}

.pomo-mini-open:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    -webkit-text-fill-color: white;
}

.pomo-mini-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
}

.pomo-mini-time {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    line-height: 1;
}

.pomo-mini-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.15rem;
}

/* ==========================================
   STUDY CONTEXT & CHIPS
   ========================================== */
.pomo-context-wrap {
    animation: fadeIn 0.4s ease;
}

.pomo-subject-chips::-webkit-scrollbar {
    display: none;
}

.pomo-context-chip:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pomo-context-chip:active {
    transform: translateY(0);
}

#pomoTaskInput::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

#pomoTaskInput:focus {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
}

/* Animations found in layout.css or dashboard.css but defining here for safety */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* +5m Boost Button Styling */
.pomo-add5-text {
    position: absolute;
    /* Move it closer to the timer to avoid overlap */
    top: 65%;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pomo-add5-text:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.pomo-add5-text:active {
    transform: scale(0.95);
}

/* ==========================================
   CLEAN FULLSCREEN MODE
   ========================================== */
/* Hide non-essential elements when in native fullscreen or mobile fallback */
#pomodoroView:fullscreen .modal-header,
#pomodoroView:fullscreen .pomo-mode-bar,
#pomodoroView:fullscreen .pomo-context-wrap,
#pomodoroView:fullscreen .pomo-settings-details,
#pomodoroView:fullscreen .pomo-fullscreen-btn-wrap,
#pomodoroView:fullscreen .pomo-controls,
#pomodoroView:fullscreen .pomo-sessions,
#pomodoroView.is-pomo-fs .modal-header,
#pomodoroView.is-pomo-fs .pomo-mode-bar,
#pomodoroView.is-pomo-fs .pomo-context-wrap,
#pomodoroView.is-pomo-fs .pomo-settings-details,
#pomodoroView.is-pomo-fs .pomo-fullscreen-btn-wrap,
#pomodoroView.is-pomo-fs .pomo-controls,
#pomodoroView.is-pomo-fs .pomo-sessions {
    display: none !important;
}

/* Ensure the panel expands and centers the ring in fullscreen */
#pomodoroView:fullscreen .pomodoro-panel,
#pomodoroView.is-pomo-fs .pomodoro-panel {
    min-height: 100vh;
    padding: 0;
    justify-content: center;
}

#pomodoroView:fullscreen .pomo-ring-wrap,
#pomodoroView.is-pomo-fs .pomo-ring-wrap {
    margin: auto !important; /* Centered in the middle of the screen */
    transform: scale(1.3);   /* Slightly larger for a deeper focus feel */
    z-index: 10;
}

/* Hide the in-ring boost text specifically in fullscreen */
#pomodoroView:fullscreen #btnPomoAdd5,
#pomodoroView.is-pomo-fs #btnPomoAdd5 {
    display: none !important;
}

/* Fullscreen Controls Top Row styling for dead-center text */
.fs-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 280px; /* Precise width to help centering */
    margin-bottom: 0.5rem;
}

.fs-top-side {
    flex: 1;
    display: flex;
    align-items: center;
}

.fs-top-side.left { justify-content: flex-start; }
.fs-top-side.right { justify-content: flex-end; }

/* New Fullscreen Boost Button (Text version) */
.fs-boost-btn {
    width: auto !important;
    height: 36px !important;
    padding: 0 0.8rem !important;
    border-radius: 2rem !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.fs-boost-btn:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Horizontal and centered cycle text */
.fs-cycle-text {
    white-space: nowrap !important;
    display: inline-block !important;
    text-align: center;
    min-width: 80px;
    font-size: 1rem;
    font-weight: 700;
}

/* Opaque and centered FS control panel */
#pomoFullscreenControls {
    background: rgba(15, 23, 42, 0.98) !important; /* Increased opacity for smaller screens */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    margin-bottom: 2rem;
    z-index: 100;
}
