/**
 * Pomodoro Timer Styles
 * 포모도로 타이머 전용 스타일
 *
 * @package Zipper
 */

/* ========================================
   2컬럼 레이아웃 (데스크톱)
   ======================================== */

.pomo-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.pomo-layout-timer {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 16px;
    padding: 24px;
}

.pomo-layout-tasks {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
}

@media (max-width: 900px) {
    .pomo-layout {
        grid-template-columns: 1fr;
    }

    .pomo-layout-tasks {
        position: static;
    }
}

/* ========================================
   모드 선택 탭 (집중 / 휴식)
   ======================================== */

.pomo-mode-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.pomo-mode-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #5f5a56;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.pomo-mode-tab:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.pomo-mode-tab.active {
    background: #2d2a26;
    border-color: #2d2a26;
    color: #fff;
}

.pomo-mode-tab.active.focus {
    background: #e74c3c;
    border-color: #e74c3c;
}

.pomo-mode-tab.active.short-break {
    background: #27ae60;
    border-color: #27ae60;
}

.pomo-mode-tab.active.long-break {
    background: #3498db;
    border-color: #3498db;
}

/* ========================================
   타이머 디스플레이
   ======================================== */

.pomo-timer-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.pomo-circle-wrap {
    position: relative;
    width: 260px;
    height: 260px;
    margin-bottom: 16px;
}

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

.pomo-circle-bg {
    fill: none;
    stroke: #e8e4dc;
    stroke-width: 12;
}

.pomo-circle-progress {
    fill: none;
    stroke: #e74c3c;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.pomo-circle-progress.short-break {
    stroke: #27ae60;
}

.pomo-circle-progress.long-break {
    stroke: #3498db;
}

.pomo-time-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.pomo-time-value {
    font-size: 56px;
    font-weight: 700;
    color: #2d2a26;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.pomo-time-label {
    font-size: 14px;
    color: #5f5a56;
    margin-top: 8px;
}

/* 선형 프로그레스 바 */
.pomo-linear-progress {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background: #e8e4dc;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

.pomo-linear-fill {
    height: 100%;
    background: #e74c3c;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.pomo-linear-fill.short-break {
    background: #27ae60;
}

.pomo-linear-fill.long-break {
    background: #3498db;
}

/* ========================================
   컨트롤 버튼
   ======================================== */

.pomo-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.pomo-control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 20px;
}

.pomo-control-btn.start {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.pomo-control-btn.start:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}

.pomo-control-btn.pause {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.pomo-control-btn.pause:hover {
    transform: scale(1.05);
}

.pomo-control-btn.reset {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    color: #5f5a56;
}

.pomo-control-btn.reset:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.pomo-control-btn.skip {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    color: #5f5a56;
}

.pomo-control-btn.skip:hover {
    border-color: #3498db;
    color: #3498db;
}

/* ========================================
   사이클 정보
   ======================================== */

.pomo-cycle-info {
    display: flex;
    gap: 24px;
    justify-content: center;
    font-size: 14px;
    color: #5f5a56;
    margin-bottom: 24px;
}

.pomo-cycle-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pomo-cycle-info .count {
    font-weight: 600;
    color: #d4af37;
}

.pomo-cycle-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pomo-cycle-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e8e4dc;
    transition: all 0.3s;
}

.pomo-cycle-dot.completed {
    background: #e74c3c;
}

.pomo-cycle-dot.current {
    background: #d4af37;
    transform: scale(1.2);
}

/* ========================================
   현재 작업 선택
   ======================================== */

.pomo-current-task {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
}

.pomo-current-task-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pomo-current-task-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pomo-current-task-label i {
    color: #d4af37;
}

.pomo-task-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #fff;
    color: #2d2a26;
    cursor: pointer;
}

.pomo-task-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* ========================================
   작업 목록
   ======================================== */

.pomo-tasks-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
}

.pomo-tasks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pomo-tasks-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pomo-tasks-title i {
    color: #d4af37;
}

.pomo-add-task-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pomo-add-task-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
}

.pomo-task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pomo-task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    transition: all 0.2s;
    cursor: grab;
}

.pomo-task-item:hover {
    border-color: #d4af37;
}

.pomo-task-item.completed {
    opacity: 0.6;
    background: #f5f5f5;
}

.pomo-task-item.completed .pomo-task-name {
    text-decoration: line-through;
    color: #5f5a56;
}

.pomo-task-item.dragging {
    opacity: 0.5;
    border-style: dashed;
}

.pomo-task-checkbox {
    position: relative;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.pomo-task-checkbox input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.pomo-task-checkbox .checkmark {
    width: 22px;
    height: 22px;
    background: #fff;
    border: 2px solid #e8e4dc;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pomo-task-checkbox input:checked + .checkmark {
    background: #27ae60;
    border-color: #27ae60;
}

.pomo-task-checkbox input:checked + .checkmark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.pomo-task-content {
    flex: 1;
    min-width: 0;
}

.pomo-task-name {
    font-size: 14px;
    font-weight: 500;
    color: #2d2a26;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pomo-task-pomos {
    font-size: 12px;
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pomo-task-pomos .completed-count {
    color: #d4af37;
    font-weight: 600;
}

.pomo-task-actions {
    display: flex;
    gap: 6px;
}

.pomo-task-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #a09a94;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pomo-task-action-btn:hover {
    background: #e8e4dc;
    color: #5f5a56;
}

.pomo-task-action-btn.delete:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.pomo-tasks-empty {
    text-align: center;
    padding: 30px 20px;
    color: #a09a94;
    font-size: 14px;
}

.pomo-tasks-empty i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.pomo-estimated-finish {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8e4dc;
    font-size: 13px;
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pomo-estimated-finish i {
    color: #d4af37;
}

.pomo-estimated-finish .time {
    font-weight: 600;
    color: #2d2a26;
}

/* 작업 추가 모달 */
.pomo-task-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.pomo-task-modal.open {
    display: flex;
}

.pomo-task-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.pomo-task-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pomo-task-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
}

.pomo-task-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #faf9f7;
    border-radius: 50%;
    cursor: pointer;
    color: #5f5a56;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pomo-task-modal-close:hover {
    background: #e8e4dc;
}

.pomo-task-form-group {
    margin-bottom: 16px;
}

.pomo-task-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 8px;
}

.pomo-task-form-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    box-sizing: border-box;
}

.pomo-task-form-group input:focus {
    outline: none;
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.pomo-pomo-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pomo-stepper-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e8e4dc;
    background: #faf9f7;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #5f5a56;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pomo-stepper-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.pomo-stepper-value {
    font-size: 20px;
    font-weight: 600;
    color: #2d2a26;
    min-width: 40px;
    text-align: center;
}

.pomo-task-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.pomo-task-modal-actions button {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.pomo-task-cancel-btn {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    color: #5f5a56;
}

.pomo-task-cancel-btn:hover {
    background: #e8e4dc;
}

.pomo-task-save-btn {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    border: none;
    color: #fff;
}

.pomo-task-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* ========================================
   설정 패널
   ======================================== */

.pomo-settings-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    overflow: hidden;
}

.pomo-settings-toggle {
    width: 100%;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #faf9f7;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.pomo-settings-toggle i {
    color: #d4af37;
    margin-right: 8px;
}

.pomo-settings-toggle .arrow {
    color: #a09a94;
    transition: transform 0.3s;
}

.pomo-settings-toggle.open .arrow {
    transform: rotate(180deg);
}

.pomo-settings-content {
    display: none;
    padding: 20px;
    border-top: 1px solid #e8e4dc;
}

.pomo-settings-content.open {
    display: block;
}

.pomo-settings-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pomo-settings-group {
    flex: 1;
    min-width: 100px;
}

.pomo-settings-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 8px;
}

.pomo-settings-group input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    text-align: center;
    box-sizing: border-box;
}

.pomo-settings-group input[type="number"]:focus {
    outline: none;
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.pomo-presets {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pomo-preset-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pomo-preset-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.pomo-preset-btn.active {
    background: #2d2a26;
    border-color: #2d2a26;
    color: #fff;
}

.pomo-settings-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pomo-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pomo-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.pomo-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pomo-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #e8e4dc;
    border-radius: 24px;
    transition: 0.3s;
}

.pomo-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.pomo-toggle-switch input:checked + .pomo-toggle-slider {
    background: #d4af37;
}

.pomo-toggle-switch input:checked + .pomo-toggle-slider::before {
    transform: translateX(20px);
}

.pomo-option-label {
    font-size: 14px;
    color: #2d2a26;
}

/* ========================================
   반응형
   ======================================== */

@media (max-width: 768px) {
    .pomo-layout-timer {
        padding: 20px;
    }

    .pomo-mode-tabs {
        flex-wrap: wrap;
    }

    .pomo-mode-tab {
        flex: 1;
        min-width: 80px;
        padding: 8px 12px;
        font-size: 13px;
        text-align: center;
    }

    .pomo-circle-wrap {
        width: 220px;
        height: 220px;
    }

    .pomo-time-value {
        font-size: 44px;
    }

    .pomo-cycle-info {
        flex-wrap: wrap;
        gap: 16px;
    }

    .pomo-settings-row {
        gap: 12px;
    }

    .pomo-settings-group {
        min-width: 80px;
    }

    .pomo-presets {
        justify-content: center;
    }

    .pomo-task-modal-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .pomo-layout-timer {
        padding: 16px;
    }

    .pomo-circle-wrap {
        width: 180px;
        height: 180px;
    }

    .pomo-time-value {
        font-size: 36px;
    }

    .pomo-control-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .pomo-task-item {
        padding: 12px;
    }

    .pomo-task-name {
        font-size: 13px;
    }
}

/* ========================================
   유틸리티
   ======================================== */

.hidden {
    display: none !important;
}
