/* CalWhat Calculator Platform - PregnancyWeightCalculator Specific Styles */
/* This file contains calculator-specific styles */
  

    .input-group-custom {
        margin-bottom: 20px;
    }

    .input-label {
        display: block;
        font-size: 1rem;
        font-weight: 600;
        color: #2d3748;
        margin-bottom: 8px;
    }

        .input-label i {
            color: #ff8fab;
            margin-right: 8px;
            width: 20px;
        }

    .tooltip-icon {
        display: inline-block;
        width: 18px;
        height: 18px;
        line-height: 18px;
        text-align: center;
        background: #ff8fab;
        color: white;
        border-radius: 50%;
        font-size: 12px;
        cursor: help;
        margin-left: 5px;
        position: relative;
    }

        .tooltip-icon .tooltip-text {
            visibility: hidden;
            width: 250px;
            background-color: #2d3748;
            color: #fff;
            text-align: left;
            border-radius: 8px;
            padding: 10px;
            position: absolute;
            z-index: 1000;
            bottom: 125%;
            left: 50%;
            margin-left: -125px;
            opacity: 0;
            transition: opacity 0.3s;
            font-size: 13px;
            font-weight: normal;
            line-height: 1.4;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }

            .tooltip-icon .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;
            }

        .tooltip-icon:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }

    .form-input, .form-select {
        width: 100%;
        padding: 12px 15px;
        font-size: 1rem;
        border: 2px solid #ff8fab;
        border-radius: 10px;
        transition: all 0.3s ease;
        background: white;
    }

        .form-input:focus, .form-select:focus {
            outline: none;
            border-color: #ff6b9d;
            box-shadow: 0 0 0 3px rgba(255, 139, 171, 0.1);
        }

        .form-input.error {
            border-color: #ef4444;
            animation: shake 0.3s;
        }

    .input-range {
        font-size: 0.85rem;
        color: #718096;
        margin-top: 5px;
    }

    .input-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    @media (max-width: 768px) {
        .input-row {
            grid-template-columns: 1fr;
        }
    }


    .result-card {
        background: linear-gradient(135deg, #ff8fab 0%, #ff6b9d 100%);
        color: white;
    }

        .result-card .card-title {
            color: white;
            border-bottom-color: rgba(255, 255, 255, 0.3);
        }

    .bmi-display {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 15px;
        padding: 20px;
        text-align: center;
        margin-bottom: 20px;
    }

        .bmi-display .bmi-label {
            font-size: 1rem;
            opacity: 0.95;
            margin-bottom: 8px;
        }

        .bmi-display .bmi-value {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 5px;
        }

        .bmi-display .bmi-category {
            font-size: 1.1rem;
            font-weight: 600;
        }

    .weight-range {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 15px;
        padding: 20px;
        margin-bottom: 20px;
    }

        .weight-range .range-label {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 12px;
        }

        .weight-range .range-values {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
        }

        .weight-range .range-value {
            font-size: 1.8rem;
            font-weight: 700;
        }

    .progress-section {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 15px;
        padding: 20px;
        margin-bottom: 20px;
    }

        .progress-section .progress-item {
            display: flex;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

            .progress-section .progress-item:last-child {
                border-bottom: none;
            }

        .progress-section .progress-label {
            font-weight: 500;
            opacity: 0.95;
        }

        .progress-section .progress-value {
            font-weight: 700;
            font-size: 1.1rem;
        }

    .status-indicator {
        padding: 15px;
        border-radius: 10px;
        margin: 15px 0;
        font-weight: 600;
        text-align: center;
    }

    .status-normal {
        background: rgba(72, 187, 120, 0.2);
        border: 2px solid #48bb78;
    }

    .status-warning {
        background: rgba(251, 191, 36, 0.2);
        border: 2px solid #fbbf24;
    }

    .status-danger {
        background: rgba(239, 68, 68, 0.2);
        border: 2px solid #ef4444;
    }

    .nutrition-advice {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 15px;
        padding: 20px;
        margin-top: 20px;
    }

        .nutrition-advice h4 {
            font-size: 1.2rem;
            margin-bottom: 12px;
        }

        .nutrition-advice ul {
            list-style: none;
            padding: 0;
        }

            .nutrition-advice ul li {
                padding: 8px 0;
                padding-left: 25px;
                position: relative;
                line-height: 1.6;
            }

                .nutrition-advice ul li::before {
                    content: "✓";
                    position: absolute;
                    left: 0;
                    font-weight: 700;
                }

    .chart-container {
        position: relative;
        height: 300px;
        margin-top: 20px;
        background: white;
        border-radius: 15px;
        padding: 15px;
    }

    /* 新增樣式：體重記錄歷史 */
    .history-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 15px;
    }

        .history-table th {
            background: rgba(255, 139, 171, 0.1);
            padding: 10px;
            text-align: left;
            font-weight: 600;
            border-bottom: 2px solid #ff8fab;
        }

        .history-table td {
            padding: 10px;
            border-bottom: 1px solid #eee;
        }

        .history-table tr:hover {
            background: rgba(255, 139, 171, 0.05);
        }

    .btn-delete {
        background: #ef4444;
        color: white;
        border: none;
        padding: 5px 10px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 0.85rem;
    }

        .btn-delete:hover {
            background: #dc2626;
        }

    /* GDM風險卡片 */
    .risk-card {
        background: white;
        border-radius: 15px;
        padding: 20px;
        margin-bottom: 20px;
    }

    .risk-badge {
        display: inline-block;
        padding: 8px 16px;
        border-radius: 20px;
        font-weight: 600;
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .risk-low {
        background: #d1fae5;
        color: #065f46;
    }

    .risk-medium {
        background: #fef3c7;
        color: #92400e;
    }

    .risk-high {
        background: #fee2e2;
        color: #991b1b;
    }

    .risk-factors {
        list-style: none;
        padding: 0;
        margin: 15px 0;
    }

        .risk-factors li {
            padding: 8px 0;
            padding-left: 25px;
            position: relative;
        }

            .risk-factors li::before {
                content: "⚠️";
                position: absolute;
                left: 0;
            }

    /* 營養計劃卡片 */
    .nutrition-plan-card {
        background: white;
        border-radius: 15px;
        padding: 20px;
        margin-bottom: 20px;
    }

    .calorie-display {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 12px;
        padding: 15px;
        text-align: center;
        margin-bottom: 15px;
    }

        .calorie-display .calorie-value {
            font-size: 2rem;
            font-weight: 700;
        }

        .calorie-display .calorie-label {
            font-size: 0.9rem;
            opacity: 0.9;
        }

    .macro-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        margin: 20px 0;
    }

    .macro-item {
        background: #f7fafc;
        border-radius: 10px;
        padding: 15px;
        text-align: center;
    }

        .macro-item .macro-label {
            font-size: 0.85rem;
            color: #718096;
            margin-bottom: 5px;
        }

        .macro-item .macro-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: #2d3748;
        }

    /* 寶寶體重卡片 */
    .baby-weight-card {
        background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
        color: #2d3748;
        border-radius: 15px;
        padding: 20px;
        margin-bottom: 20px;
    }

        .baby-weight-card .baby-icon {
            font-size: 3rem;
            text-align: center;
            margin-bottom: 15px;
        }

        .baby-weight-card .weight-display {
            font-size: 2.5rem;
            font-weight: 700;
            text-align: center;
            margin-bottom: 10px;
        }

    /* 產後恢復卡片 */
    .postpartum-card {
        background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
        color: #2d3748;
        border-radius: 15px;
        padding: 20px;
        margin-bottom: 20px;
    }

    .recovery-timeline {
        margin-top: 20px;
    }

        .recovery-timeline .timeline-item {
            display: flex;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid rgba(45, 55, 72, 0.1);
        }

    /* 水腫提醒卡片 */
    .edema-card {
        background: #fff3cd;
        border-left: 4px solid #fbbf24;
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 20px;
    }

        .edema-card .edema-title {
            font-size: 1.2rem;
            font-weight: 600;
            color: #92400e;
            margin-bottom: 10px;
        }

    .edema-checklist {
        list-style: none;
        padding: 0;
        margin: 15px 0;
    }

        .edema-checklist li {
            padding: 5px 0;
            padding-left: 25px;
            position: relative;
        }

            .edema-checklist li::before {
                content: "□";
                position: absolute;
                left: 0;
                font-size: 1.2rem;
            }

    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes shake {
        0%, 100% {
            transform: translateX(0);
        }

        25% {
            transform: translateX(-10px);
        }

        75% {
            transform: translateX(10px);
        }
    }

    @media (max-width: 768px) {
        .page-header h1 {
            font-size: 2rem;
        }

        .page-header .subtitle {
            font-size: 1rem;
        }

        .glass-card {
            padding: 20px;
        }

        .bmi-value {
            font-size: 2rem !important;
        }

        .range-value {
            font-size: 1.5rem !important;
        }

        .macro-grid {
            grid-template-columns: 1fr;
        }
    }

    .d-none {
        display: none;
    }

    .trimester-badge {
        display: inline-block;
        padding: 5px 12px;
        border-radius: 15px;
        font-size: 0.9rem;
        font-weight: 600;
        margin-left: 10px;
    }

    .trimester-1 {
        background: #dbeafe;
        color: #1e40af;
    }

    .trimester-2 {
        background: #fef3c7;
        color: #92400e;
    }

    .trimester-3 {
        background: #fce7f3;
        color: #9f1239;
    }