/**
 * 寶寶週歲抓周準備計畫器 CSS
 * 繁體中文版 (台灣) - 傳統抓周儀式準備
 */

/* ========================================
   輸入區域
   ======================================== */
.dol-input-section {
    margin-bottom: 24px;
}

.dol-input-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.dol-input-group {
    flex: 1;
}

.dol-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 8px;
}

.dol-input-group input[type="text"],
.dol-input-group input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e8e4dc;
    border-radius: 8px;
    background: #fff;
    color: #2d2a26;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.dol-input-group input:focus {
    outline: none;
    border-color: #d4af37;
}

.dol-input-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(212, 175, 55, 0.08);
    border-radius: 8px;
    font-size: 13px;
    color: #5f5a56;
}

.dol-input-hint i {
    color: #d4af37;
    flex-shrink: 0;
}

/* 已儲存資料提示 */
.dol-saved-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(39, 174, 96, 0.08);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #27ae60;
}

.dol-saved-notice i {
    font-size: 16px;
}

/* ========================================
   提醒區域
   ======================================== */
.dol-reminder-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.dol-reminder-box {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
}

.dol-reminder-box.today {
    border-color: rgba(231, 76, 60, 0.3);
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05) 0%, rgba(231, 76, 60, 0.02) 100%);
}

.dol-reminder-box.upcoming {
    border-color: rgba(52, 152, 219, 0.3);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(52, 152, 219, 0.02) 100%);
}

.dol-reminder-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.dol-reminder-box.today .dol-reminder-header {
    color: #e74c3c;
}

.dol-reminder-box.upcoming .dol-reminder-header {
    color: #3498db;
}

.dol-reminder-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dol-reminder-content ul li {
    padding: 8px 12px;
    background: #faf9f7;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #2d2a26;
}

.dol-reminder-content ul li:last-child {
    margin-bottom: 0;
}

.dol-upcoming-date {
    font-weight: 600;
    color: #3498db;
    margin-right: 8px;
}

.dol-no-tasks {
    text-align: center;
    padding: 16px;
    color: #a09a94;
    font-size: 13px;
    margin: 0;
}

/* ========================================
   進度區域
   ======================================== */
.dol-progress-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.dol-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dol-progress-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dol-progress-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.dol-progress-value {
    font-size: 13px;
    color: #5f5a56;
}

.dol-progress-percent {
    font-size: 24px;
    font-weight: 700;
    color: #d4af37;
}

.dol-progress-bar {
    height: 12px;
    background: #e8e4dc;
    border-radius: 6px;
    overflow: hidden;
}

.dol-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* ========================================
   時間線區域
   ======================================== */
.dol-timeline-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.dol-timeline-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dol-timeline-section-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.dol-timeline-section-header h3 i {
    color: #d4af37;
}

.dol-party-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.dol-party-date {
    font-size: 13px;
    color: #5f5a56;
}

.dol-party-dday {
    font-size: 20px;
    font-weight: 700;
    color: #d4af37;
}

/* 時間線 */
.dol-timeline {
    position: relative;
}

.dol-timeline-item {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.dol-timeline-item:last-child {
    margin-bottom: 0;
}

/* 時間線標記 */
.dol-timeline-marker {
    width: 16px;
    height: 16px;
    background: #e8e4dc;
    border: 3px solid #fff;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
    box-shadow: 0 0 0 2px #e8e4dc;
}

.dol-timeline-item.completed .dol-timeline-marker {
    background: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.3);
}

.dol-timeline-item.today .dol-timeline-marker {
    background: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3);
    animation: pulse 2s infinite;
}

.dol-timeline-item.overdue .dol-timeline-marker {
    background: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(231, 76, 60, 0.1); }
}

/* 時間線內容 */
.dol-timeline-content {
    flex: 1;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
}

.dol-timeline-item.completed .dol-timeline-content {
    opacity: 0.7;
}

.dol-timeline-item.today .dol-timeline-content {
    border-color: rgba(231, 76, 60, 0.4);
    background: rgba(231, 76, 60, 0.03);
}

.dol-timeline-item.overdue .dol-timeline-content {
    border-color: rgba(231, 76, 60, 0.3);
    background: rgba(231, 76, 60, 0.02);
}

/* 時間線頭部 */
.dol-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dol-timeline-dday {
    display: inline-flex;
    padding: 4px 10px;
    background: #2d2a26;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
}

.dol-timeline-item.completed .dol-timeline-dday {
    background: #27ae60;
}

.dol-timeline-item.today .dol-timeline-dday,
.dol-timeline-item.overdue .dol-timeline-dday {
    background: #e74c3c;
}

.dol-timeline-date {
    font-size: 12px;
    color: #5f5a56;
}

/* 任務卡片 */
.dol-timeline-card {
    margin-top: 8px;
}

/* 複選框 */
.dol-task-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.dol-task-checkbox input[type="checkbox"] {
    display: none;
}

.dol-checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #e8e4dc;
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
    margin-top: 2px;
}

.dol-task-checkbox input[type="checkbox"]:checked + .dol-checkmark {
    background: #27ae60;
    border-color: #27ae60;
}

.dol-task-checkbox input[type="checkbox"]:checked + .dol-checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.dol-task-checkbox:hover .dol-checkmark {
    border-color: #d4af37;
}

.dol-task-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.dol-timeline-item.completed .dol-task-title {
    text-decoration: line-through;
    color: #5f5a56;
}

.dol-task-description {
    font-size: 13px;
    color: #5f5a56;
    margin: 8px 0 0 30px;
    line-height: 1.5;
}

.dol-task-budget {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 6px;
    font-size: 12px;
    color: #d4af37;
    font-weight: 500;
    margin: 8px 0 0 30px;
}

/* ========================================
   預算指南區域
   ======================================== */
.dol-budget-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.dol-budget-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px 0;
}

.dol-budget-section h3 i {
    color: #d4af37;
}

.dol-budget-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.dol-budget-card {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.dol-budget-card.highlight {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(184, 134, 11, 0.08) 100%);
    border-color: rgba(212, 175, 55, 0.3);
}

.dol-budget-label {
    font-size: 13px;
    color: #5f5a56;
    margin-bottom: 8px;
}

.dol-budget-value {
    font-size: 26px;
    font-weight: 700;
    color: #2d2a26;
}

.dol-budget-card.highlight .dol-budget-value {
    color: #d4af37;
}

.dol-budget-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dol-budget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #faf9f7;
    border-radius: 8px;
}

.dol-budget-item-name {
    font-size: 14px;
    color: #2d2a26;
}

.dol-budget-item-value {
    font-size: 14px;
    color: #5f5a56;
}

/* ========================================
   操作按鈕
   ======================================== */
.dol-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

/* ========================================
   工具類
   ======================================== */
.hidden {
    display: none !important;
}

/* ========================================
   響應式
   ======================================== */
@media (max-width: 768px) {
    .dol-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .dol-reminder-section {
        grid-template-columns: 1fr;
    }

    .dol-timeline-section {
        padding: 16px;
    }

    .dol-timeline-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .dol-party-info {
        align-items: flex-start;
    }

    .dol-timeline-item {
        gap: 12px;
    }

    .dol-timeline-content {
        padding: 12px;
    }

    .dol-budget-section {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .dol-budget-summary {
        grid-template-columns: 1fr;
    }

    .dol-budget-value {
        font-size: 22px;
    }

    .dol-actions {
        flex-direction: column;
    }

    .dol-actions .tool-btn {
        width: 100%;
    }

    .dol-timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
