/* ==========================================================================
   Pomodoro
   ========================================================================== */

.pomodoro-content {
    max-width: 380px;
    text-align: center;
}

.pomodoro-content h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.pomodoro-content h2 .icon-btn { margin: -0.25rem -0.25rem -0.25rem 0; }

/* --- Aşama etiketi ------------------------------------------------------ */
.pomo-phase {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.pomo-phase--focus { background: var(--brand-soft);   color: var(--brand-primary); }
.pomo-phase--short { background: var(--success-soft); color: var(--success); }
.pomo-phase--long  { background: var(--info-soft);    color: var(--info); }

/* --- Halka -------------------------------------------------------------- */
.pomo-ring-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
}

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

.pomo-ring-track {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 10;
}

.pomo-ring-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 250ms linear, stroke 300ms var(--ease-out);
}

.pomo-ring-fill--focus { stroke: var(--brand-primary); }
.pomo-ring-fill--short { stroke: var(--success); }
.pomo-ring-fill--long  { stroke: var(--info); }

.pomo-clock {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
    color: var(--text-primary);
}

/* --- Bağlı görev -------------------------------------------------------- */
.pomo-task {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    max-width: 100%;
    padding: 0.3125rem 0.75rem;
    margin-bottom: 0.875rem;
    background: var(--bg-inset);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-full);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pomo-task i { color: var(--brand-primary); flex-shrink: 0; }

/* --- Tur noktaları ------------------------------------------------------ */
.pomo-dots {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.pomo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-color-hover);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.pomo-dot.is-done    { background: var(--brand-primary); }
.pomo-dot.is-current { background: var(--brand-primary); transform: scale(1.4); }

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

.pomo-controls .secondary-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: var(--border-radius-full);
}

.pomo-controls .secondary-btn i { font-size: 1.15rem; }

.pomo-main {
    min-width: 140px;
    justify-content: center;
    padding: 0.6875rem 1.25rem;
    border-radius: var(--border-radius-full);
    font-size: var(--text-base);
}

.pomo-today {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    padding-top: 0.875rem;
    border-top: 1px solid var(--border-color);
}

.pomo-today strong { color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* --- Ayarlar ------------------------------------------------------------ */
.pomo-settings {
    margin-top: 1rem;
    text-align: left;
    border-top: 1px solid var(--border-color);
    padding-top: 0.875rem;
}

.pomo-settings summary {
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    list-style: none;
}

.pomo-settings summary::-webkit-details-marker { display: none; }
.pomo-settings summary::before { content: '⚙  '; }
.pomo-settings summary:hover { color: var(--text-primary); }

.pomo-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    margin: 0.875rem 0;
}

.pomo-settings-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
}

.pomo-settings-grid input {
    padding: 0.4375rem 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-inset);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
    outline: none;
}

.pomo-settings-grid input:focus {
    border-color: var(--brand-primary);
    box-shadow: var(--focus-ring);
}

.pomo-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    color: var(--text-primary);
    margin-top: 0.375rem;
    cursor: pointer;
}

.pomo-check input { accent-color: var(--brand-primary); width: 1rem; height: 1rem; }

/* --- Çalışırken görünen küçük çubuk ------------------------------------- */
.pomodoro-bar {
    position: fixed;
    left: calc(var(--sidebar-width) + 1.25rem);
    bottom: 1.25rem;
    z-index: 95;
    display: none;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3125rem 0.4375rem 0.3125rem 0.3125rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-full);
    box-shadow: var(--shadow-lg);
}

.pomodoro-bar.active { display: flex; }

.pomo-bar-open {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-full);
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.pomo-bar-open:hover { background: var(--bg-tertiary); }

.pomo-bar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pomoPulse 2s var(--ease-in-out) infinite;
}

.pomo-bar-dot--focus { background: var(--brand-primary); }
.pomo-bar-dot--short { background: var(--success); }
.pomo-bar-dot--long  { background: var(--info); }

@keyframes pomoPulse { 50% { opacity: 0.35; } }

.pomo-bar-time {
    font-weight: 700;
    font-size: var(--text-base);
    font-variant-numeric: tabular-nums;
}

.pomo-bar-phase {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* --- Zaman bloğu üzerindeki odak düğmesi -------------------------------- */
.block-focus-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--border-radius-sm);
    background: var(--bg-secondary);
    color: var(--brand-primary);
    box-shadow: var(--shadow-xs);
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.block-focus-btn i { font-size: 0.9rem; }
.time-block:hover .block-focus-btn { opacity: 1; }
.block-focus-btn:hover { transform: scale(1.1); }

@media (hover: none) {
    /* Dokunmatikte hover yok; düğme her zaman görünür ama sönük */
    .block-focus-btn { opacity: 0.65; }
}

@media (max-width: 768px) {
    .pomodoro-bar { left: 1rem; right: auto; bottom: 5.25rem; }
    .pomo-ring-wrap { width: 180px; height: 180px; }
    .pomo-clock { font-size: 2.4rem; }
    .pomodoro-content { max-width: none; }
}
