/* CalWhat Calculator Platform - PeriodCalculator Specific Styles */
/* This file contains calculator-specific styles */
        .input-group-custom {
            margin-bottom: 12px;
        }

        .input-label {
            font-weight: 500;
            color: #4a5568;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.95rem;
            position: relative;
        }

        .tooltip-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #ff6b9d;
            color: white;
            font-size: 0.7rem;
            cursor: help;
            margin-left: 5px;
            position: relative;
        }

            .tooltip-icon:hover .tooltip-text {
                visibility: visible;
                opacity: 1;
            }

        .tooltip-text {
            visibility: hidden;
            opacity: 0;
            position: absolute;
            z-index: 1000;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            background-color: #2d3748;
            color: white;
            text-align: center;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 0.85rem;
            white-space: nowrap;
            transition: opacity 0.3s;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            font-weight: 400;
        }

            .tooltip-text::after {
                content: "";
                position: absolute;
                top: 100%;
                left: 50%;
                margin-left: -5px;
                border-width: 5px;
                border-style: solid;
                border-color: #2d3748 transparent transparent transparent;
            }

        .input-wrapper {
            position: relative;
        }

        .form-input {
            width: 100%;
            padding: 12px 55px 12px 15px;
            border: 2px solid #48bb78;
            border-radius: 12px;
            font-size: 1rem;
            transition: all 0.3s ease;
            background: white;
            font-family: 'Roboto Mono', monospace;
        }

            .form-input:focus {
                outline: none;
                border-color: #38a169;
                box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
            }

        .input-unit {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #718096;
            font-weight: 500;
            pointer-events: none;
        }

        .purpose-toggle {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-top: 10px;
        }

        .purpose-option {
            position: relative;
        }

            .purpose-option input[type="radio"] {
                position: absolute;
                opacity: 0;
                pointer-events: none;
            }

            .purpose-option label {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 8px;
                padding: 15px 10px;
                border: 2px solid #e2e8f0;
                border-radius: 12px;
                cursor: pointer;
                transition: all 0.3s ease;
                background: white;
                text-align: center;
            }

                .purpose-option label i {
                    font-size: 1.5rem;
                    color: #a0aec0;
                    transition: all 0.3s ease;
                }

                .purpose-option label span {
                    font-size: 0.9rem;
                    font-weight: 600;
                    color: #4a5568;
                    transition: all 0.3s ease;
                }

                .purpose-option label:hover {
                    border-color: #ff6b9d;
                    transform: translateY(-2px);
                    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.15);
                }

            .purpose-option input[type="radio"]:checked + label {
                border-color: #ff6b9d;
                background: linear-gradient(135deg, #fff5f8 0%, #ffe8f0 100%);
                box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
            }

                .purpose-option input[type="radio"]:checked + label i {
                    color: #ff6b9d;
                }

                .purpose-option input[type="radio"]:checked + label span {
                    color: #ff6b9d;
                }

        @media (max-width: 768px) {
            .purpose-toggle {
                grid-template-columns: 1fr;
            }

            .purpose-option label {
                flex-direction: row;
                justify-content: center;
            }
        }

        .result-item {
            margin-bottom: 15px;
            padding: 15px;
            background: linear-gradient(135deg, #fff0f5 0%, #ffe5ec 100%);
            border-radius: 12px;
            border-left: 4px solid #ff6b9d;
        }

        .result-label {
            font-size: 0.9rem;
            color: #718096;
            margin-bottom: 5px;
            font-weight: 500;
        }

        .result-value {
            font-family: 'Roboto Mono', monospace;
            font-size: 1.5rem;
            font-weight: 700;
            color: #c44569;
            display: flex;
            align-items: baseline;
            gap: 8px;
        }

        .result-unit {
            font-size: 1rem;
            color: #718096;
            font-weight: 500;
        }

        .phase-badge {
            display: inline-block;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.95rem;
            font-weight: 600;
            margin-top: 5px;
        }

        .phase-menstruation {
            background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
            color: white;
        }

        .phase-follicular {
            background: linear-gradient(135deg, #90cdf4 0%, #4299e1 100%);
            color: white;
        }

        .phase-ovulation {
            background: linear-gradient(135deg, #68d391 0%, #48bb78 100%);
            color: white;
        }

        .phase-luteal {
            background: linear-gradient(135deg, #fbd38d 0%, #f6ad55 100%);
            color: white;
        }

        .fertility-meter {
            width: 100%;
            height: 30px;
            background: #e2e8f0;
            border-radius: 15px;
            overflow: hidden;
            margin-top: 10px;
            position: relative;
        }

        .fertility-bar {
            height: 100%;
            background: linear-gradient(90deg, #f6ad55 0%, #48bb78 50%, #f6ad55 100%);
            transition: width 0.5s ease;
            border-radius: 15px;
        }

        .fertility-percentage {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-weight: 700;
            color: #2d3748;
            font-size: 0.9rem;
        }

        .prediction-table {
            width: 100%;
            margin-top: 15px;
            border-collapse: collapse;
        }

            .prediction-table th {
                background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
                color: white;
                padding: 12px;
                text-align: left;
                font-weight: 600;
                font-size: 0.95rem;
            }

            .prediction-table td {
                padding: 12px;
                border-bottom: 1px solid #e2e8f0;
                color: #4a5568;
            }

            .prediction-table tr:hover {
                background: #fff0f5;
            }

        .legend-container {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-top: 15px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.9rem;
            color: #4a5568;
        }

        .legend-color {
            width: 24px;
            height: 24px;
            border-radius: 6px;
        }

        .legend-menstruation {
            background: #fc8181;
        }

        .legend-fertile {
            background: #f6ad55;
            transition: background 0.3s ease;
        }

        .legend-ovulation {
            background: #48bb78;
            transition: background 0.3s ease;
        }

        /* 避孕模式 - 危險期配色 */
        .purpose-contraception .legend-fertile {
            background: #ef4444;
        }

        .purpose-contraception .legend-ovulation {
            background: #dc2626;
        }

        /* 備孕模式 - 最佳時機配色 */
        .purpose-conception .legend-fertile {
            background: #48bb78;
        }

        .purpose-conception .legend-ovulation {
            background: #22c55e;
        }

        /* 追蹤模式 - 中性配色（預設） */
        .purpose-tracking .legend-fertile {
            background: #f6ad55;
        }

        .purpose-tracking .legend-ovulation {
            background: #fb923c;
        }

        .legend-safe {
            background: #cbd5e0;
        }

        .info-box {
            background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
            border: 2px solid #4dd0e1;
            border-radius: 12px;
            padding: 15px;
            margin-top: 15px;
        }

            .info-box p {
                color: #006064;
                font-weight: 500;
                margin-bottom: 8px;
                line-height: 1.6;
            }

                .info-box p:last-child {
                    margin-bottom: 0;
                }

        .advice-content {
            border-radius: 12px;
            padding: 20px;
            margin-top: 15px;
            transition: all 0.3s ease;
        }

            /* 預設樣式 - 綠色（追蹤模式、備孕模式） */
            .advice-content.advice-default {
                background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
                border: 2px solid #48bb78;
            }

                .advice-content.advice-default h4 {
                    color: #166534;
                }

                .advice-content.advice-default p {
                    color: #166534;
                }

                .advice-content.advice-default ul li {
                    color: #166534;
                }

                    .advice-content.advice-default ul li:before {
                        color: #48bb78;
                    }

            /* 警告樣式 - 紅色/橘色（避孕模式 - 高危險期） */
            .advice-content.advice-danger {
                background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
                border: 2px solid #ef4444;
            }

                .advice-content.advice-danger h4 {
                    color: #991b1b;
                }

                .advice-content.advice-danger p {
                    color: #991b1b;
                }

                .advice-content.advice-danger ul li {
                    color: #991b1b;
                }

                    .advice-content.advice-danger ul li:before {
                        color: #ef4444;
                    }

            /* 警示樣式 - 黃色（避孕模式 - 中度危險期） */
            .advice-content.advice-warning {
                background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
                border: 2px solid #f59e0b;
            }

                .advice-content.advice-warning h4 {
                    color: #92400e;
                }

                .advice-content.advice-warning p {
                    color: #92400e;
                }

                .advice-content.advice-warning ul li {
                    color: #92400e;
                }

                    .advice-content.advice-warning ul li:before {
                        color: #f59e0b;
                    }

            /* 通用樣式 */
            .advice-content h4 {
                font-size: 1.1rem;
                margin-bottom: 12px;
                font-weight: 700;
            }

            .advice-content p {
                font-weight: 500;
                margin-bottom: 10px;
                line-height: 1.7;
            }

                .advice-content p:last-child {
                    margin-bottom: 0;
                }

            .advice-content ul {
                list-style: none;
                padding-left: 0;
                margin-top: 10px;
            }

                .advice-content ul li {
                    padding: 8px 0;
                    padding-left: 25px;
                    position: relative;
                    line-height: 1.6;
                }

                    .advice-content ul li:before {
                        content: '✓';
                        position: absolute;
                        left: 0;
                        font-weight: bold;
                    }

        .warning-box {
            background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
            border: 2px solid #ffc107;
            border-radius: 12px;
            padding: 15px;
            margin-top: 15px;
        }

            .warning-box p {
                color: #856404;
                font-weight: 500;
                margin-bottom: 8px;
                line-height: 1.6;
            }

                .warning-box p:last-child {
                    margin-bottom: 0;
                }

        .medical-disclaimer {
            background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
            border: 3px solid #ef4444;
            border-radius: 12px;
            padding: 20px;
            margin-top: 15px;
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
        }

            .medical-disclaimer h4 {
                color: #991b1b;
                font-weight: 700;
                margin-bottom: 12px;
                display: flex;
                align-items: center;
                gap: 10px;
            }

            .medical-disclaimer p {
                color: #991b1b;
                font-weight: 500;
                margin-bottom: 10px;
                line-height: 1.8;
            }

            .medical-disclaimer ul {
                margin: 10px 0;
                padding-left: 20px;
            }

            .medical-disclaimer li {
                color: #991b1b;
                margin-bottom: 8px;
                line-height: 1.6;
            }

            .medical-disclaimer p:last-child {
                margin-bottom: 0;
            }

        .chart-container {
            position: relative;
            height: 400px;
            margin-top: 20px;
        }

        .month-selector {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
        }

            .month-selector button {
                flex: 1;
                padding: 10px;
                border: 2px solid #ff6b9d;
                background: white;
                color: #ff6b9d;
                border-radius: 10px;
                font-weight: 600;
                cursor: pointer;
                transition: all 0.3s ease;
            }

                .month-selector button.active {
                    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
                    color: white;
                }

                .month-selector button:hover {
                    background: #ff6b9d;
                    color: white;
                }

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @media (max-width: 768px) {
            .page-header h1 {
                font-size: 2rem;
            }

            .result-value {
                font-size: 1.3rem;
            }

            .chart-container {
                height: 300px;
            }

            .prediction-table {
                font-size: 0.85rem;
            }

                .prediction-table th,
                .prediction-table td {
                    padding: 8px;
                }
        }