/* ========== 番茄钟组件（内嵌版） ========== */

/* 内嵌容器 */
.pomodoro-inline {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--input-area-bg, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    transition: background var(--transition-speed, 0.3s) ease, border-color var(--transition-speed, 0.3s) ease;
}
.pomodoro-inline.is-running {
    border-color: #ef4444;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.15);
}
.pomodoro-inline.is-paused {
    border-color: #f59e0b;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.15);
}

/* 环形进度 */
.pomo-ring-wrap {
    position: relative;
    width: 68px;
    height: 68px;
    flex-shrink: 0;
}
.pomo-ring {
    width: 68px;
    height: 68px;
    transform: rotate(-90deg);
}
.pomo-ring .ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 5;
}
.pomo-ring .ring-progress {
    fill: none;
    stroke: #ef4444;
    stroke-width: 5;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}
.pomo-ring .ring-progress.paused {
    stroke: #f59e0b;
}
.pomo-ring .ring-progress.break-mode {
    stroke: #10b981;
}
.pomo-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    line-height: 1;
}
.pomo-time {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary, #1e293b);
    font-variant-numeric: tabular-nums;
}
.pomo-status {
    display: block;
    font-size: 8px;
    color: var(--text-secondary, #94a3b8);
    margin-top: 2px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* 右侧主体 */
.pomo-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 时长标签 + 统计 */
.pomo-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pomo-duration-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary, #64748b);
    display: flex;
    align-items: center;
    gap: 4px;
}
.pomo-duration-label i {
    font-size: 14px;
    color: #ef4444;
}
.pomo-tag {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
    display: flex;
    align-items: center;
    gap: 3px;
}
.pomo-tag i {
    font-size: 13px;
}
.pomo-tag em {
    font-style: normal;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

/* 操作按钮 */
.pomo-btn-row {
    display: flex;
    gap: 20px;
    align-items: center;
}
.pomo-btn-spacer {
    flex: 1;
}
.pomo-act {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.12s, opacity 0.12s;
}
.pomo-act:hover { transform: scale(1.08); }
.pomo-act:active { transform: scale(0.95); }

.pomo-act-start {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
}
.pomo-act-pause {
    background: linear-gradient(135deg, #f59e0b, #eab308);
    color: #fff;
}
.pomo-act-reset {
    background: var(--bg-tertiary, #f1f5f9);
    color: var(--text-secondary, #64748b);
    border: 1px solid var(--border-color, #e2e8f0);
}
.pomo-act-confirm {
    background: var(--bg-tertiary, #f1f5f9);
    color: #94a3b8;
    border: 1px dashed var(--border-color, #e2e8f0);
    transition: transform 0.12s, opacity 0.12s, background 0.25s, color 0.25s, border 0.25s, box-shadow 0.25s;
    height: 32px;
    font-size: 15px;
    border-radius: 12px;
    padding: 0 12px;
}
.pomo-act-confirm:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.pomo-act-confirm:not(:disabled) {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
    cursor: pointer;
}
.pomo-act-confirm:not(:disabled):hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}
.pomo-act-confirm:not(:disabled):active {
    transform: scale(0.95);
}

/* ========== 到时通知弹窗（保留浮动） ========== */
.pomodoro-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--bg-primary, #fff);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 380px;
}
.pomodoro-notification.show {
    transform: translateX(-50%) translateY(0);
}
.pomodoro-notification .notif-icon {
    font-size: 26px;
    flex-shrink: 0;
}
.pomodoro-notification .notif-content h4 {
    margin: 0 0 2px;
    font-size: 14px;
    color: var(--text-primary, #1e293b);
}
.pomodoro-notification .notif-content p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary, #64748b);
}
.pomodoro-notification .notif-close {
    background: none;
    border: none;
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ========== 暗色主题适配 ========== */
[data-theme="dark"] .pomodoro-inline {
    background: var(--input-area-bg, #1e293b);
    border-color: var(--border-color, #334155);
}
[data-theme="dark"] .pomo-ring .ring-bg {
    stroke: #334155;
}
[data-theme="dark"] .pomo-act-reset {
    background: #334155;
    color: #94a3b8;
}
[data-theme="dark"] .pomo-act-confirm:disabled {
    background: #334155;
    color: #475569;
    border-color: #475569;
}
[data-theme="dark"] .pomodoro-notification {
    background: #1e293b;
}
[data-theme="dark"] .pomodoro-notification .notif-content h4 {
    color: #f1f5f9;
}
[data-theme="dark"] .pomodoro-notification .notif-content p {
    color: #94a3b8;
}

/* ========== 移动端适配 ========== */
@media (max-width: 480px) {
    .pomodoro-inline {
        gap: 10px;
        padding: 8px 10px;
    }
    .pomo-ring-wrap {
        width: 56px;
        height: 56px;
    }
    .pomo-ring {
        width: 56px;
        height: 56px;
    }
    .pomo-time {
        font-size: 13px;
    }
    .pomo-act {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }
    .pomo-act-confirm {
        height: 32px;
        font-size: 15px;
        border-radius: 12px;
    }
}
