/**
 * 副食品添加時間計算器 CSS
 * Tool: baby-weaning-calculator
 * Category: pregnancy
 */

/* ===========================
   雙欄佈局
   =========================== */
.weaning-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.weaning-input-column {
    flex: 0 0 360px;
    min-width: 0;
}

.weaning-result-column {
    flex: 1;
    min-width: 0;
    position: sticky;
    top: 24px;
}

/* ===========================
   輸入區域
   =========================== */
.weaning-input-section {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 24px;
}

.weaning-input-section h2 {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.weaning-input-section h2 i {
    color: #d4af37;
}

.weaning-input-group {
    margin-bottom: 20px;
}

.weaning-input-group:last-child {
    margin-bottom: 0;
}

.weaning-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d2a26;
    font-size: 0.95rem;
}

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

.weaning-input-group input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* 餵養方式選擇 */
.weaning-feeding-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.weaning-feeding-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.weaning-feeding-option:hover {
    border-color: #d4af37;
}

.weaning-feeding-option.selected {
    border-color: #d4af37;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.02) 100%);
}

.weaning-feeding-option input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #d4af37;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.weaning-feeding-info {
    flex: 1;
}

.weaning-feeding-name {
    font-weight: 500;
    color: #2d2a26;
    margin-bottom: 4px;
}

.weaning-feeding-desc {
    font-size: 0.85rem;
    color: #5f5a56;
    line-height: 1.4;
}

.weaning-input-hint {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #5f5a56;
    line-height: 1.5;
    padding: 10px 12px;
    background: #fff;
    border-radius: 6px;
    border-left: 3px solid #d4af37;
}

/* ===========================
   當前階段卡片（主要）
   =========================== */
.weaning-current-stage {
    background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
    border: 2px solid #d4af37;
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    margin-bottom: 20px;
}

.weaning-baby-name {
    font-size: 1rem;
    color: #5f5a56;
    margin-bottom: 12px;
}

.weaning-stage-badge {
    display: inline-block;
    padding: 8px 24px;
    background: #d4af37;
    border-radius: 24px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.weaning-stage-badge.not-started {
    background: #e8e4dc;
    color: #5f5a56;
}

.weaning-current-age {
    font-size: 0.95rem;
    color: #5f5a56;
    margin-bottom: 16px;
}

.weaning-stage-info {
    padding-top: 16px;
    border-top: 1px solid #e8e4dc;
}

.weaning-stage-desc {
    font-size: 0.95rem;
    color: #2d2a26;
    line-height: 1.6;
}

/* ===========================
   階段時間線
   =========================== */
.weaning-timeline {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.weaning-timeline h3 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.weaning-timeline h3 i {
    color: #d4af37;
}

.weaning-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.weaning-timeline-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f0ede8;
    position: relative;
}

.weaning-timeline-item:last-child {
    border-bottom: none;
}

/* 時間線圖標 */
.weaning-timeline-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: #f0ede8;
    color: #5f5a56;
    position: relative;
    z-index: 1;
}

.weaning-timeline-item.passed .weaning-timeline-icon {
    background: #e8e4dc;
    color: #5f5a56;
}

.weaning-timeline-item.current .weaning-timeline-icon {
    background: #d4af37;
    color: #fff;
}

.weaning-timeline-item.upcoming .weaning-timeline-icon {
    background: #faf9f7;
    color: #b0a99f;
    border: 2px dashed #e8e4dc;
}

/* 時間線內容 */
.weaning-timeline-content {
    flex: 1;
    min-width: 0;
}

.weaning-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    gap: 12px;
}

.weaning-timeline-stage {
    font-weight: 600;
    color: #2d2a26;
    font-size: 1rem;
}

.weaning-timeline-item.passed .weaning-timeline-stage {
    color: #5f5a56;
}

.weaning-timeline-item.current .weaning-timeline-stage {
    color: #d4af37;
}

.weaning-timeline-dday {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.weaning-timeline-item.passed .weaning-timeline-dday {
    background: #f0ede8;
    color: #5f5a56;
}

.weaning-timeline-item.current .weaning-timeline-dday {
    background: #d4af37;
    color: #2d2a26;
}

.weaning-timeline-item.upcoming .weaning-timeline-dday {
    background: rgba(212, 175, 55, 0.15);
    color: #b08d1e;
}

.weaning-timeline-date {
    font-size: 0.9rem;
    color: #5f5a56;
    margin-bottom: 4px;
}

.weaning-timeline-age {
    font-size: 0.85rem;
    color: #8a857f;
}

/* ===========================
   階段詳細資訊
   =========================== */
.weaning-stage-details {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.weaning-stage-details h3 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.weaning-stage-details h3 i {
    color: #d4af37;
}

.weaning-detail-card {
    background: #faf9f7;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.weaning-detail-card:last-child {
    margin-bottom: 0;
}

.weaning-detail-title {
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.weaning-detail-title i {
    color: #d4af37;
    font-size: 0.9rem;
}

.weaning-detail-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weaning-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding: 6px 0;
    border-bottom: 1px dashed #e8e4dc;
}

.weaning-detail-item:last-child {
    border-bottom: none;
}

.weaning-detail-label {
    color: #5f5a56;
}

.weaning-detail-value {
    font-weight: 500;
    color: #2d2a26;
}

/* ===========================
   參考資訊框
   =========================== */
.weaning-info-box {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.weaning-info-box h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.weaning-info-box h3 i {
    color: #d4af37;
}

.weaning-info-text {
    font-size: 0.9rem;
    color: #5f5a56;
    line-height: 1.7;
}

.weaning-info-text strong {
    color: #2d2a26;
}

/* ===========================
   預設狀態（輸入前）
   =========================== */
.weaning-default-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
}

.weaning-default-icon {
    font-size: 4rem;
    color: #e8e4dc;
    margin-bottom: 16px;
}

.weaning-default-text {
    font-size: 1rem;
    color: #5f5a56;
    line-height: 1.6;
}

/* ===========================
   響應式
   =========================== */
@media (max-width: 900px) {
    .weaning-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .weaning-input-column {
        flex: none;
        width: 100%;
    }

    .weaning-result-column {
        position: static;
    }
}

@media (max-width: 600px) {
    .weaning-input-section {
        padding: 20px 16px;
    }

    .weaning-current-stage {
        padding: 24px 16px;
    }

    .weaning-stage-badge {
        font-size: 1.1rem;
        padding: 6px 20px;
    }

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

    .weaning-timeline-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .weaning-timeline-header {
        flex-direction: column;
        gap: 6px;
    }

    .weaning-feeding-options {
        gap: 8px;
    }

    .weaning-feeding-option {
        padding: 12px 14px;
    }
}
