/* ============================================================
   POMODORO 95
   Pixel-perfect Windows 95 design system
   ============================================================ */

/* ================================================================
   LAYOUT
   ================================================================ */

.pomodoro-tabs-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--win95-bg);
    font-family: var(--win95-font);
    font-size: var(--win95-font-size);
}

.pomodoro-tab-panel {
    display: none;
    flex: 1;
    overflow: hidden;
    background: var(--win95-bg);
}

.pomodoro-tab-panel.active {
    display: flex;
    flex-direction: column;
}

/* ================================================================
   TIMER PANEL
   ================================================================ */

.pomodoro-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 0 6px;
    gap: 7px;
    flex: 1;
    width: 100%;
    background: var(--win95-bg);
}

/* ---- Phase banner — Win95 title-bar style strip ---- */
.pomodoro-phase {
    font-family: var(--win95-font);
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
    padding: 2px 0;
    width: 100%;
    background: var(--win95-navy);
    color: #ffffff;
    text-transform: uppercase;
    /* Raised bevel — same as Win95 title bar */
    box-shadow:
        inset -1px -1px var(--win95-black),
        inset  1px  1px #6060c0,
        inset -2px -2px #0000a0,
        inset  2px  2px #8080e0;
}

.pomodoro-phase.break-phase {
    background: #007000;
    box-shadow:
        inset -1px -1px var(--win95-black),
        inset  1px  1px #60b060,
        inset -2px -2px #005000,
        inset  2px  2px #80d080;
}

.pomodoro-phase.long-break-phase {
    background: #700070;
    box-shadow:
        inset -1px -1px var(--win95-black),
        inset  1px  1px #b060b0,
        inset -2px -2px #500050,
        inset  2px  2px #d080d0;
}

/* ---- Timer box — deep sunken well, black background, LCD digits ---- */
.pomodoro-timer-box {
    width: 100%;
    height: 84px;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Deep sunken bevel — 4-layer Win95 inset */
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset  1px  1px var(--win95-gray),
        inset -2px -2px var(--win95-light),
        inset  2px  2px var(--win95-dark);
    position: relative;
}

/* LCD digit display — green phosphor */
.pomodoro-timer-digits {
    font-family: var(--win95-font-mono);
    font-size: 50px;
    font-weight: bold;
    color: #20ee20;
    letter-spacing: 5px;
    line-height: 1;
    text-shadow:
        0 0 8px #00bb00,
        0 0 2px #005500;
    user-select: none;
    padding-left: 5px; /* compensate for letter-spacing on last char */
}

/* ---- Progress track — Win95 sunken channel with block fill ---- */
.pomodoro-progress-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pomodoro-progress-track {
    width: 100%;
    height: 14px;
    background: var(--win95-bg);
    /* Sunken well — standard Win95 progress bar outer border */
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset  1px  1px var(--win95-gray),
        inset -2px -2px var(--win95-light),
        inset  2px  2px var(--win95-dark);
    padding: 2px;
    position: relative;
    overflow: hidden;
}

.pomodoro-progress-fill {
    height: 100%;
    width: 0%;
    /* Red chunky blocks — work session */
    background: repeating-linear-gradient(
        to right,
        #cc2200 0px,
        #cc2200 8px,
        transparent 8px,
        transparent 10px
    );
    transition: width 0.4s linear;
}

.pomodoro-progress-fill.break-fill {
    /* Green blocks — short break */
    background: repeating-linear-gradient(
        to right,
        #20ee20 0px,
        #20ee20 8px,
        transparent 8px,
        transparent 10px
    );
}

.pomodoro-progress-fill.longbreak-fill {
    /* Navy blocks — long break */
    background: repeating-linear-gradient(
        to right,
        var(--win95-navy) 0px,
        var(--win95-navy) 8px,
        transparent 8px,
        transparent 10px
    );
}

/* ---- Controls ---- */
.pomodoro-controls {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.pomodoro-controls .win95-btn {
    min-width: 68px;
    font-size: 11px;
}

/* ---- Session row ---- */
.pomodoro-session-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    /* Raised groupbox feel */
    box-shadow:
        inset -1px -1px var(--win95-gray),
        inset  1px  1px var(--win95-white);
    background: var(--win95-bg);
    padding: 5px 8px 6px;
}

.pomodoro-session-info {
    font-family: var(--win95-font);
    font-size: 11px;
    font-weight: bold;
    color: var(--win95-text);
    text-align: center;
}

.pomodoro-session-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

/* Each dot: a tiny Win95 checkbox-sized square */
.pomodoro-session-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--win95-bg);
    /* Sunken (empty) */
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset  1px  1px var(--win95-gray),
        inset -2px -2px var(--win95-light),
        inset  2px  2px var(--win95-dark);
}

/* Done dot: raised + navy fill = like a pressed button */
.pomodoro-session-dot.done {
    background: var(--win95-navy);
    box-shadow:
        inset -1px -1px var(--win95-black),
        inset  1px  1px #6060c0,
        inset -2px -2px #0000a0,
        inset  2px  2px #8080e0;
}

/* Active dot: red raised — "it" */
.pomodoro-session-dot.active {
    background: #cc2200;
    box-shadow:
        inset -1px -1px #800000,
        inset  1px  1px #ff6040,
        inset -2px -2px #aa1100,
        inset  2px  2px #ee4020;
    animation: dot-blink 1s steps(2, start) infinite;
}

@keyframes dot-blink {
    50% { background: #881100; }
}

/* ---- Active task display ---- */
.pomodoro-active-task-display {
    width: 100%;
    padding: 2px 6px;
    font-family: var(--win95-font);
    font-size: 11px;
    font-weight: bold;
    color: var(--win95-navy);
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: var(--win95-white);
    /* Sunken input field look */
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset  1px  1px var(--win95-gray),
        inset -2px -2px var(--win95-light),
        inset  2px  2px var(--win95-dark);
}

/* ================================================================
   SETTINGS DIALOG
   ================================================================ */

.pomodoro-settings {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pomodoro-settings label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-family: var(--win95-font);
    font-size: 11px;
}

.pomodoro-settings input[type="number"] {
    width: 52px;
}

.pomodoro-settings-hint {
    font-size: 10px;
    color: var(--win95-gray);
    margin-top: 4px;
    text-align: center;
    font-family: var(--win95-font);
}

/* ================================================================
   TASK LIST TAB
   ================================================================ */

.pomodoro-task-input-row {
    display: flex;
    gap: 4px;
    padding: 6px 6px 5px;
    /* Raised toolbar strip */
    box-shadow:
        inset 0 -1px var(--win95-gray),
        inset 0  1px var(--win95-white);
    flex-shrink: 0;
    background: var(--win95-bg);
}

.pomodoro-task-input-row .win95-input {
    flex: 1;
    min-width: 0;
    height: 21px;
    padding: 2px 4px;
    font-size: 11px;
}

.pomodoro-task-list {
    flex: 1;
    overflow-y: auto;
    background: var(--win95-white);
    margin: 4px 6px 6px;
    /* Sunken listview border */
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset  1px  1px var(--win95-gray),
        inset -2px -2px var(--win95-light),
        inset  2px  2px var(--win95-dark);
}

.pomodoro-task-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 5px;
    border-bottom: 1px solid #e8e8e8;
    font-family: var(--win95-font);
    font-size: 11px;
    min-height: 22px;
    background: var(--win95-white);
    cursor: default;
}

.pomodoro-task-item:last-child {
    border-bottom: none;
}

.pomodoro-task-item:hover {
    background: #d4d0c8;
}

.pomodoro-task-item.pomodoro-task-active {
    background: var(--win95-navy);
    color: var(--win95-white);
}

.pomodoro-task-item.pomodoro-task-active:hover {
    background: var(--win95-navy);
}

.pomodoro-task-item.pomodoro-task-done {
    color: var(--win95-gray);
}

.pomodoro-task-item input[type="checkbox"] {
    flex-shrink: 0;
    margin: 0;
    cursor: default;
}

.pomodoro-task-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pomodoro-task-text.completed {
    text-decoration: line-through;
    color: var(--win95-gray);
}

.pomodoro-task-item.pomodoro-task-active .pomodoro-task-text.completed {
    color: #a0a0d0;
}

.pomodoro-task-pom-count {
    flex-shrink: 0;
    font-size: 10px;
    font-family: var(--win95-font);
    color: var(--win95-gray);
    white-space: nowrap;
    font-style: italic;
}

.pomodoro-task-item.pomodoro-task-active .pomodoro-task-pom-count {
    color: #a0a0d0;
}

.pomodoro-task-set-active {
    flex-shrink: 0;
    font-size: 10px;
    min-width: auto;
    min-height: auto;
    height: 17px;
    padding: 0 5px;
}

.pomodoro-task-delete {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    min-width: unset;
    min-height: unset;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--win95-font);
    font-size: 11px;
    font-weight: bold;
    cursor: default;
    background: var(--win95-bg);
    color: var(--win95-text);
    border: none;
    box-shadow:
        inset -1px -1px var(--win95-black),
        inset  1px  1px var(--win95-white),
        inset -2px -2px var(--win95-gray),
        inset  2px  2px var(--win95-light);
}

.pomodoro-task-delete:active {
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset  1px  1px var(--win95-black),
        inset -2px -2px var(--win95-light),
        inset  2px  2px var(--win95-gray);
    padding: 1px 0 0 1px;
}

.pomodoro-task-item.pomodoro-task-active .pomodoro-task-delete,
.pomodoro-task-item.pomodoro-task-active .pomodoro-task-set-active {
    background: var(--win95-navy);
    color: var(--win95-white);
}

.pomodoro-task-empty {
    padding: 20px 8px;
    text-align: center;
    color: var(--win95-gray);
    font-family: var(--win95-font);
    font-size: 11px;
}

.pomodoro-clear-done {
    display: block;
    margin: 5px auto 3px;
    font-size: 10px;
    min-width: auto;
    min-height: auto;
    height: 19px;
    padding: 0 8px;
}

/* ================================================================
   STATS TAB
   ================================================================ */

.pomodoro-stats {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
}

/* Group box — Win95 etched border */
.pomodoro-stats-group {
    position: relative;
    padding: 6px 8px 7px;
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset  1px  1px var(--win95-gray);
    background: var(--win95-bg);
}

.pomodoro-stats-group-title {
    font-family: var(--win95-font);
    font-size: 11px;
    font-weight: bold;
    color: var(--win95-text);
    margin-bottom: 5px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--win95-gray);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pomodoro-stat-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--win95-font);
    font-size: 11px;
    padding: 2px 0;
}

.pomodoro-stat-value {
    font-weight: bold;
    color: #cc2200;
}

/* Chart — sunken listview box */
.pomodoro-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 72px;
    padding: 3px 3px 0;
    background: var(--win95-white);
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset  1px  1px var(--win95-gray),
        inset -2px -2px var(--win95-light),
        inset  2px  2px var(--win95-dark);
}

.pomodoro-chart-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
    gap: 1px;
}

.pomodoro-chart-bar-wrap {
    flex: 1;
    display: flex;
    align-items: flex-end;
    width: 100%;
    justify-content: center;
}

.pomodoro-chart-bar {
    width: 14px;
    min-height: 0;
    background: var(--win95-navy);
    /* Top highlight line — makes bars look raised */
    box-shadow: inset 0 1px 0 #4040c0;
}

.pomodoro-chart-col.today .pomodoro-chart-bar {
    background: #cc2200;
    box-shadow: inset 0 1px 0 #ff6040;
}

.pomodoro-chart-label {
    font-family: var(--win95-font);
    font-size: 10px;
    text-align: center;
    color: var(--win95-text);
    line-height: 1.2;
}

.pomodoro-chart-col.today .pomodoro-chart-label {
    font-weight: bold;
    color: #cc2200;
}

.pomodoro-chart-count {
    font-family: var(--win95-font);
    font-size: 10px;
    text-align: center;
    color: var(--win95-gray);
    min-height: 12px;
    line-height: 1.2;
}

.pomodoro-stats-reset {
    align-self: flex-end;
    min-width: auto;
    min-height: auto;
    height: 19px;
    padding: 0 8px;
    font-size: 10px;
}

/* ================================================================
   TASKBAR FLASH
   ================================================================ */

@keyframes taskbar-flash-anim {
    0%, 100% { background: var(--win95-bg); color: var(--win95-text); }
    50%       { background: var(--win95-navy); color: var(--win95-white); }
}

.taskbar-app-btn.taskbar-flash {
    animation: taskbar-flash-anim 0.5s steps(2, start) infinite;
}

/* ================================================================
   COMPAT — SVG ring is gone
   ================================================================ */
.pomodoro-ring-svg { display: none; }
