/*
  =================================================================
  فایل استایل اختصاصی محاسبه‌گر اضافه وزن بارداری
  نسخه: 2.0 - بهینه‌سازی شده با A11y (Contrast) و E-E-A-T
  =================================================================
*/

/* --- Form Divider & Optional Text --- */
.form-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 25px 0;
}

.optional-info-text {
    font-size: 0.9rem;
    color: var(--light-text-color);
    margin-bottom: 15px;
    text-align: center;
    font-style: italic;
}

/* --- Date Input --- */
.date-input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 1.1rem;
    font-family: var(--font-family-base);
}

/* --- Custom Pregnancy Gain Result Card --- */
.result-card-preg-gain {
    background: linear-gradient(145deg, var(--cat-زنان-و-بارداری, #e83e8c), #ff7aa2);
    color: white;
    border-radius: var(--border-radius-base);
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.result-card-preg-gain.visible {
    opacity: 1;
    transform: translateY(0);
}

.result-section {
    background-color: rgba(255, 255, 255, 0.15); /* Slightly more opaque for better separation */
    padding: 15px;
    border-radius: var(--border-radius-base);
}

.result-section h4 {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9); /* Use color instead of opacity for better text rendering */
    margin-bottom: 8px;
    font-weight: bold;
}
.result-section p {
    margin: 0;
}
.result-section strong {
     color: #fff;
     font-weight: bold;
}

.main-result .result-value {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: bold;
    line-height: 1.2;
    color: white;
}
.main-result .unit {
    font-size: 1rem;
    opacity: 0.9;
}

.pre-bmi-section p {
    font-size: 1.1rem;
}

/* --- Current Status Section --- */
.current-status-section p {
    font-size: 1rem;
    margin-bottom: 5px;
}
.status-indicator {
    font-size: 1.1rem !important;
    font-weight: bold;
    margin-top: 10px;
    padding: 8px;
    border-radius: var(--border-radius-small);
}

/* --- A11y Contrast Fix: Use opaque backgrounds --- */
.status-indicator.status-below {
    background-color: #ffc107; /* Yellow */
    color: #111; /* Dark text for high contrast */
}
.status-indicator.status-within {
    background-color: #20c997; /* Green */
    color: #fff; /* White text (passes 4.15:1) */
}
.status-indicator.status-above {
    background-color: #dc3545; /* Red */
    color: #fff; /* White text (passes 3.9:1) */
}
/* --- End A11y Fix --- */


.result-card-preg-gain .secondary-cta {
    background-color: white;
    color: var(--cat-زنان-و-بارداری, #e83e8c);
    font-weight: bold;
    margin-top: 10px;
}
.result-card-preg-gain .secondary-cta:hover {
    background-color: #fff0f5; /* Light pink */
}

/* --- Content Table --- */
.gain-table-container {
    overflow-x: auto;
    margin: 20px 0;
}
table { width: 100%; border-collapse: collapse; text-align: center; }
th, td { padding: 12px 15px; border: 1px solid var(--border-color); vertical-align: middle; }
th { background-color: var(--bg-color); font-weight: bold; }
/* Status colors for tables */
table .status-underweight { background-color: rgba(255, 193, 7, 0.1); }
table .status-normal { background-color: rgba(32, 201, 151, 0.1); }
table .status-overweight { background-color: rgba(253, 126, 20, 0.1); }
table .status-obese { background-color: rgba(220, 53, 69, 0.1); }

/* --- A11y: Reduce Motion --- */
@media (prefers-reduced-motion: reduce) {
  .result-card-preg-gain,
  .result-card-preg-gain.visible {
    transition: none;
    opacity: 1;
    transform: translateY(0);
  }
  
  html {
    scroll-behavior: auto;
  }
}