/* ============================================================
   POMODORO — motivo "o-sinal": o anel pulsante É a sessão.
   Foco = arco verde · Pausa = arco muted/tinta · ponto-sinal verde da marca.
   Tamanho: medium (2 colunas × 1 linha) · card + modal.
   ============================================================ */
:root { --zpm-focus: var(--green); --zpm-break: var(--muted); }

/* host: card neutro do tema; o conteúdo monta o layout próprio */
.widget-pomodoro-host {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color);
    padding: 0 !important;
    overflow: hidden;
}
.widget-pomodoro-host .w-content-wrap { height: 100%; }
.widget-pomodoro-host .widget-actions-bottom { display: none; }

/* ---------- anel reutilizado (card + modal) ---------- */
/* overflow visível p/ o ponto-sinal não ser cortado pela viewBox ao pulsar */
.zpm-ring svg, .zpm-big-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.zpm-track { fill: none; stroke: var(--sunk); stroke-width: 7; }
.zpm-fill { fill: none; stroke-width: 7; stroke-linecap: round;
    transition: stroke-dashoffset 0.5s cubic-bezier(.16,1,.3,1), stroke 0.3s; }
.zpm-core { fill: var(--green); transform-box: fill-box; transform-origin: center;
    filter: drop-shadow(0 0 3px rgba(77,124,15,.4));
    transition: cx 0.5s cubic-bezier(.16,1,.3,1), cy 0.5s cubic-bezier(.16,1,.3,1); }
.zpm-core.is-break { fill: var(--muted2); filter: none; }
.zpm-core.running { animation: zpmPulse 1.8s ease-in-out infinite; }
@keyframes zpmPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .6; } }

/* ---------- CARD (medium, paisagem) ---------- */
.zpm-card { height: 100%; display: flex; align-items: center; gap: 20px;
    padding: 20px; box-sizing: border-box; color: var(--text); }
.zpm-ring { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.zpm-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; }
.zpm-ring-time { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.6rem;
    letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--text); }
.zpm-ring-tag { font-family: 'JetBrains Mono', monospace; font-size: .56rem; font-weight: 700;
    letter-spacing: .12em; color: var(--green); margin-top: 4px; text-transform: uppercase; }
.zpm-ring-tag.break { color: var(--muted); }

.zpm-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.zpm-card-head { display: flex; align-items: center; gap: 9px; }
.zpm-badge { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    background: rgba(90,148,0,.12); display: flex; align-items: center; justify-content: center; }
body.dark-mode .zpm-badge { background: rgba(155,219,31,.14); }
.zpm-badge i { font-size: 1.15rem; color: var(--green); }
.zpm-card-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem;
    letter-spacing: -.03em; margin: 0; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zpm-card-sub { font-size: .76rem; color: var(--text2); font-weight: 500; }
.zpm-card-sub strong { color: var(--text); font-weight: 700; }

.zpm-bar { height: 7px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.zpm-bar > span { display: block; height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, var(--green), var(--lime)); transition: width 0.4s ease; }

.zpm-card-actions { display: flex; gap: 8px; margin-top: 4px; }
/* .zpm-start / botão de ícone: estilo vem de .zbtn / .zbtn-icon (_core.css);
   aqui só o hook de layout. */
.zpm-start { flex: 1; }

/* mobile: anel menor à direita, badge+título no topo esquerdo */
@media (max-width: 560px) {
    .zpm-card { padding: 16px; gap: 12px; }
    .zpm-ring { width: 78px; height: 78px; order: 1; }
    .zpm-ring-time { font-size: 1.15rem; }
    .zpm-ring-tag { font-size: 0.48rem; margin-top: 2px; }
    .zpm-card-main { order: 0; flex: 1; min-width: 0; }
    .zpm-card-head { justify-content: flex-start; }
    .zpm-start { font-size: .8rem; padding: 9px 10px; }
}

/* ============================================================
   MODAL (foco em tela)
   ============================================================ */
.zpm-modal-wrap { display: flex; flex-direction: column; gap: 16px; padding: 4px 2px 8px; }

.zpm-top { display: flex; align-items: center; justify-content: space-between; }
.zpm-top .z-ey { display: flex; align-items: center; gap: 8px; }
.zpm-top i { font-size: .95rem; }

/* tabs de modo */
.zpm-tabs { display: flex; gap: 6px; }
.zpm-tab { flex: 1; padding: 9px 6px; border: 1px solid var(--line); background: var(--card); cursor: pointer;
    border-radius: 11px; font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .8rem; color: var(--text2);
    transition: background 0.18s, color 0.18s; }
.zpm-tab.active { background: var(--ink); color: #FAFAF7; border-color: var(--ink); }
body.dark-mode .zpm-tab.active { background: var(--neon); color: #0d0d0d; border-color: var(--neon); }

/* anel grande */
.zpm-stage { display: flex; flex-direction: column; align-items: center; padding: 6px 0 2px; }
.zpm-big-ring { position: relative; width: 228px; height: 228px; max-width: 72vw; max-height: 72vw; }
.zpm-big-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.zpm-big-time { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 3.7rem; letter-spacing: -.04em;
    font-variant-numeric: tabular-nums; line-height: 1; color: var(--text); }
.zpm-big-tag { font-family: 'JetBrains Mono', monospace; font-size: .66rem; font-weight: 700; letter-spacing: .16em;
    color: var(--green); margin-top: 6px; text-transform: uppercase; }
.zpm-big-tag.break { color: var(--muted); }

/* pontinhos de rodada (1 ciclo = N focos antes da pausa longa) */
.zpm-rounds { display: flex; gap: 9px; margin: 20px 0; }
.zpm-round-dot { width: 11px; height: 11px; border-radius: 99px; background: var(--sunk);
    box-shadow: inset 0 0 0 1.5px var(--line); transition: 0.2s; }
.zpm-round-dot.done { background: var(--neon); box-shadow: 0 0 7px rgba(163,255,18,.5); }

/* controles */
.zpm-controls { display: flex; align-items: center; gap: 14px; }
.zpm-ctrl { border: none; cursor: pointer; font-family: 'Outfit', sans-serif;
    display: inline-flex; align-items: center; justify-content: center; transition: transform 0.12s ease, filter 0.18s ease; }
.zpm-ctrl:active { transform: scale(.96); }
.zpm-ctrl-side { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
    color: var(--text); font-size: .95rem; }
body.dark-mode .zpm-ctrl-side { background: rgba(255,255,255,.04); }
.zpm-ctrl-side:hover { background: var(--sunk); }
.zpm-ctrl-main { padding: 14px 30px; border-radius: 16px; font-size: .95rem; }

/* painéis (Hoje / Ajustes) */
.zpm-panel { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 15px 16px; }
.zpm-panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px;
    font-family: 'Outfit', sans-serif; font-weight: 700; font-size: .84rem; color: var(--text); }
.zpm-panel-title > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.zpm-panel-title i { color: var(--green); }
.zpm-panel-title .muted { font-size: .72rem; color: var(--text2); font-weight: 600; }

.zpm-today-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.zpm-today-big { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 2rem; letter-spacing: -.03em; color: var(--text); line-height: 1; }
.zpm-today-unit { font-size: .8rem; color: var(--text2); font-weight: 500; }

/* steppers de configuração */
.zpm-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zpm-config-item { display: flex; flex-direction: column; gap: 7px; }
.zpm-config-label { font-size: .74rem; color: var(--text2); font-weight: 600; }
.zpm-stepper { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line);
    border-radius: 11px; padding: 5px 7px; background: var(--app); }
body.dark-mode .zpm-stepper { background: rgba(255,255,255,.03); }
.zpm-stepper button { width: 28px; height: 28px; border-radius: 8px; border: none; background: var(--sunk);
    color: var(--text); cursor: pointer; font-size: .85rem; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background 0.18s; }
.zpm-stepper button:hover { background: var(--line); }
.zpm-stepper-val { flex: 1; text-align: center; font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1rem; color: var(--text); }
.zpm-stepper-val small { font-size: .66rem; color: var(--muted2); font-weight: 600; margin-left: 1px; }

/* ============================================================
   v7 "QUIET PREMIUM" — escala e pesos contidos
   ============================================================ */
.zpm-ring-time { font-weight: 700; letter-spacing: -.02em; }
.zpm-ring-tag, .zpm-big-tag {
    font-family: 'Inter', sans-serif; font-weight: 600;
    letter-spacing: .09em; color: var(--text-muted);
}
.zpm-ring-tag.break, .zpm-big-tag.break { color: var(--text-muted); }
.zpm-card-title { font-size: .9rem; font-weight: 600; letter-spacing: -.01em; }
.zpm-card-sub { font-size: .72rem; }
.zpm-badge { width: 34px; height: 34px; border-radius: 11px; background: rgba(90,148,0,.09); }
body.dark-mode .zpm-badge { background: rgba(155,219,31,.11); }
.zpm-badge i { font-size: .95rem; }
.zpm-big-time { font-weight: 700; }
.zpm-today-big { font-weight: 700; font-size: 1.7rem; }
.zpm-stepper-val { font-weight: 600; font-size: .92rem; }
.zpm-panel-title { font-weight: 600; font-size: .8rem; }
.zpm-bar { height: 5px; }
.zpm-bar > span { background: var(--primary); }
