/**
 * Due Date Calculator Styles
 * 出産予定日計算機専用スタイル
 *
 * @package Zipper
 */

/* 入力エリア */
.duedate-input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.duedate-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.duedate-input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.duedate-input {
    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;
}

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

.cycle-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cycle-input-wrapper .duedate-input {
    width: 100px;
    text-align: center;
}

.cycle-hint {
    font-size: 13px;
    color: #8b7355;
}

/* 結果エリア */
.duedate-result-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* メイン結果 */
.duedate-main-result {
    background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
    border: 2px solid #d4af37;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
}

.duedate-label {
    font-size: 14px;
    font-weight: 600;
    color: #8b7355;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.duedate-value {
    font-size: 32px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1.3;
    margin-bottom: 8px;
}

.duedate-weekday {
    font-size: 16px;
    color: #5f5a56;
    margin-bottom: 12px;
}

.duedate-dday {
    display: inline-block;
    padding: 6px 16px;
    background: #d4af37;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.duedate-dday:empty {
    display: none;
}

/* 現在の週数バッジ */
.duedate-current-week {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
}

.current-week-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #d4af37 0%, #b8942d 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.current-week-info {
    flex: 1;
    font-size: 15px;
    color: #2d2a26;
    line-height: 1.5;
}

/* タイムライン */
.duedate-timeline {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
}

.timeline-header {
    margin-bottom: 16px;
}

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

.timeline-bar {
    position: relative;
    height: 16px;
    background: #e8e4dc;
    border-radius: 8px;
    overflow: visible;
    margin-bottom: 12px;
}

.timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #f5c542 0%, #d4af37 50%, #b8942d 100%);
    border-radius: 8px;
    transition: width 0.5s ease;
}

.timeline-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: #fff;
    border: 3px solid #d4af37;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    transition: left 0.5s ease;
    z-index: 2;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
}

.timeline-period {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    border-radius: 6px;
}

.timeline-period.first {
    background: rgba(212, 175, 55, 0.1);
    border-left: 3px solid #f5c542;
}

.timeline-period.second {
    background: rgba(212, 175, 55, 0.15);
    border-left: 3px solid #d4af37;
}

.timeline-period.third {
    background: rgba(184, 148, 45, 0.2);
    border-left: 3px solid #b8942d;
}

.period-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 2px;
}

.period-weeks {
    display: block;
    font-size: 12px;
    color: #5f5a56;
}

/* 主要日程 */
.duedate-key-dates {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
}

.key-dates-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 16px;
}

.key-dates-title i {
    color: #d4af37;
}

.key-dates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.key-date-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
}

.key-date-label {
    font-size: 12px;
    color: #8b7355;
}

.key-date-value {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

/* アクションボタン */
.duedate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* 結果イメージ保存用キャプチャエリア */
.capture-area {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
}

/* tool-description 内部テーブルスタイル */
.tool-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.tool-description th,
.tool-description td {
    padding: 12px;
    text-align: left;
    border: 1px solid #e8e4dc;
}

.tool-description th {
    background: #faf9f7;
    font-weight: 600;
    color: #2d2a26;
}

.tool-description td {
    color: #5f5a56;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .cycle-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .cycle-input-wrapper .duedate-input {
        width: 100%;
    }

    .duedate-main-result {
        padding: 24px 16px;
    }

    .duedate-value {
        font-size: 26px;
    }

    .duedate-current-week {
        flex-direction: column;
        text-align: center;
    }

    .key-dates-grid {
        grid-template-columns: 1fr;
    }

    .timeline-period {
        padding: 6px 2px;
    }

    .period-label {
        font-size: 12px;
    }

    .period-weeks {
        font-size: 11px;
    }

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

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

@media (max-width: 480px) {
    .duedate-value {
        font-size: 22px;
    }

    .current-week-badge {
        width: 56px;
        height: 56px;
        font-size: 18px;
    }

    .timeline-labels {
        flex-direction: column;
        gap: 4px;
    }

    .timeline-period {
        border-left: none;
        border-top: 3px solid;
    }

    .timeline-period.first {
        border-top-color: #f5c542;
    }

    .timeline-period.second {
        border-top-color: #d4af37;
    }

    .timeline-period.third {
        border-top-color: #b8942d;
    }
}
