/**
 * Timer Pomodoro — estilos da ferramenta
 */

.pomodoro-app {
    --pomo-bg: #ba4949;
    --pomo-bg-soft: #c25b5b;
    --pomo-surface: rgba(0, 0, 0, 0.12);
    --pomo-surface-hover: rgba(0, 0, 0, 0.2);
    --pomo-text: #ffffff;
    --pomo-text-muted: rgba(255, 255, 255, 0.85);
    --pomo-accent: #ffffff;
    --pomo-ring: rgba(255, 255, 255, 0.25);

    background: var(--pomo-bg);
    color: var(--pomo-text);
    border-radius: 1rem;
    transition: background-color 0.45s ease;
}

.pomodoro-app.mode-short {
    --pomo-bg: #4c9195;
    --pomo-bg-soft: #5aa0a4;
}

.pomodoro-app.mode-long {
    --pomo-bg: #437ea8;
    --pomo-bg-soft: #4f8eb8;
}

.pomodoro-inner {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.25rem 2.5rem;
}

.pomodoro-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pomodoro-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pomodoro-brand {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pomodoro-stats {
    font-size: 0.875rem;
    color: var(--pomo-text-muted);
}

.pomodoro-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--pomo-text);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.pomodoro-icon-btn:hover {
    background: var(--pomo-surface-hover);
}

.pomodoro-modes {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.pomodoro-mode-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pomo-text);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.pomodoro-mode-btn:hover {
    background: var(--pomo-surface);
}

.pomodoro-mode-btn.active {
    background: var(--pomo-surface-hover);
}

.pomodoro-timer-wrap {
    position: relative;
    width: min(320px, 78vw);
    aspect-ratio: 1;
    margin: 0 auto 2rem;
}

.pomodoro-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        var(--pomo-accent) calc(var(--pomo-progress, 0) * 1%),
        var(--pomo-ring) 0
    );
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.pomodoro-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--pomo-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pomodoro-time {
    font-size: clamp(3.5rem, 14vw, 5.5rem);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.pomodoro-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.pomodoro-btn-primary {
    min-width: 8rem;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #ffffff;
    color: var(--pomo-bg);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}

.pomodoro-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.pomodoro-btn-secondary {
    padding: 0.875rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--pomo-surface);
    color: var(--pomo-text);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.pomodoro-btn-secondary:hover {
    background: var(--pomo-surface-hover);
}

.pomodoro-active-task {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    min-height: 1.75rem;
    color: var(--pomo-text-muted);
}

.pomodoro-tasks-panel {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.pomodoro-tasks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
}

.pomodoro-task-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.pomodoro-task-input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #1f2937;
    font-size: 0.9375rem;
}

.pomodoro-task-input::placeholder {
    color: #9ca3af;
}

.pomodoro-estimate-input {
    width: 4.5rem;
    padding: 0.75rem 0.5rem;
    border-radius: 0.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #1f2937;
    text-align: center;
    font-size: 0.9375rem;
}

.pomodoro-task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.pomodoro-task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.15s;
}

.pomodoro-task-item:hover {
    background: var(--pomo-surface);
}

.pomodoro-task-item.active {
    background: var(--pomo-surface-hover);
    outline: 1px solid rgba(255, 255, 255, 0.2);
}

.pomodoro-task-item.done {
    opacity: 0.55;
}

.pomodoro-task-item.done .pomodoro-task-title {
    text-decoration: line-through;
}

.pomodoro-task-check {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pomodoro-task-item.done .pomodoro-task-check {
    background: #fff;
    border-color: #fff;
}

.pomodoro-task-item.done .pomodoro-task-check::after {
    content: '';
    width: 0.35rem;
    height: 0.6rem;
    border: solid var(--pomo-bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.pomodoro-task-title {
    flex: 1;
    min-width: 0;
    font-size: 0.9375rem;
    word-break: break-word;
}

.pomodoro-task-meta {
    font-size: 0.75rem;
    color: var(--pomo-text-muted);
    white-space: nowrap;
}

.pomodoro-task-delete {
    background: transparent;
    border: none;
    color: var(--pomo-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
}

.pomodoro-task-item:hover .pomodoro-task-delete {
    opacity: 1;
}

.pomodoro-task-delete:hover {
    background: var(--pomo-surface-hover);
    color: #fff;
}

.pomodoro-empty {
    text-align: center;
    padding: 1.5rem 0.5rem;
    color: var(--pomo-text-muted);
    font-size: 0.875rem;
}

/* Modal de configurações */
.pomodoro-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.pomodoro-modal-backdrop[hidden] {
    display: none !important;
}

.pomodoro-modal {
    background: #fff;
    color: #1f2937;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.pomodoro-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 700;
    font-size: 1.125rem;
}

.pomodoro-modal-body {
    padding: 1.25rem;
}

.pomodoro-setting {
    margin-bottom: 1rem;
}

.pomodoro-setting label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #374151;
}

.pomodoro-setting input[type="number"] {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

.pomodoro-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
}

.pomodoro-setting-row span {
    font-size: 0.875rem;
    color: #374151;
}

.pomodoro-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.pomodoro-modal-btn {
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
}

.pomodoro-modal-btn-primary {
    background: #ba4949;
    color: #fff;
}

.pomodoro-modal-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.pomodoro-modal-wide {
    max-width: 520px;
}

.pomodoro-setting select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    background: #fff;
}

.pomodoro-setting input[type="range"] {
    width: 100%;
}

.pomodoro-volume-value {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: right;
    margin-top: 0.25rem;
}

.pomodoro-report-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.pomodoro-report-stat {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    text-align: center;
}

.pomodoro-report-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ba4949;
    line-height: 1.2;
}

.pomodoro-report-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.pomodoro-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
    height: 160px;
    padding: 0.5rem 0 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.pomodoro-chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.pomodoro-chart-bar-value {
    font-size: 0.6875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    min-height: 1rem;
}

.pomodoro-chart-bar-track {
    flex: 1;
    width: 100%;
    max-width: 2.5rem;
    display: flex;
    align-items: flex-end;
}

.pomodoro-chart-bar {
    width: 100%;
    background: linear-gradient(180deg, #e57373 0%, #ba4949 100%);
    border-radius: 0.25rem 0.25rem 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
}

.pomodoro-chart-bar.is-today {
    background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
}

.pomodoro-chart-label {
    font-size: 0.6875rem;
    color: #6b7280;
    margin-top: 0.35rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.pomodoro-report-empty {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    padding: 1.5rem 0;
}

.pomodoro-report-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}
