/*
  =================================================================
  فایل استایل اختصاصی محاسبه‌گر تاریخ زایمان
  نسخه: 1.1 - بهینه‌سازی A11y
  =================================================================
*/

/* --- 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);
    background-color: white;
    
    /* === تغییر ۱: افزودن احترام به prefers-reduced-motion === */
     @media (prefers-reduced-motion: no-preference) {
        transition: var(--transition-fast);
    }
}
.date-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(123, 44, 191, 0.1);
    outline: none;
}
.form-group .info-text {
    font-size: 0.85rem;
    color: var(--light-text-color);
    margin-top: 5px;
}

/* --- Custom Pregnancy Result Card --- */
.result-card-pregnancy {
    background: linear-gradient(145deg, var(--cat-زنان-و-بارداری), #ff7aa2);
    color: white;
    border-radius: var(--border-radius-base);
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 25px;
    opacity: 0;
    transform: translateY(20px);
    
     /* === تغییر ۲: افزودن احترام به prefers-reduced-motion === */
     @media (prefers-reduced-motion: no-preference) {
        transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    }
}

.result-card-pregnancy.visible {
    opacity: 1;
    transform: translateY(0);
}

.result-card-pregnancy .main-result {
    border-bottom: 2px dashed rgba(255, 255, 255, 0.3);
    padding-bottom: 20px;
}

.result-card-pregnancy .result-header h3 {
    font-size: 1.1rem;
    font-weight: normal;
    opacity: 0.9;
    margin-bottom: 10px;
}

.result-card-pregnancy .result-value {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: bold;
    line-height: 1.2;
}

.result-card-pregnancy .result-day {
    font-size: 1.3rem;
    font-weight: bold;
    opacity: 0.9;
    margin-top: 5px;
}

/* --- Gestational Age Section --- */
.result-breakdown {
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
}
.result-breakdown h4 {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 8px;
}
.result-breakdown .age-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}
.result-breakdown .age-trimester {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}
.result-breakdown strong {
    color: #fff;
    text-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* --- Timeline Section --- */
.timeline-section h4 {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}
.pregnancy-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}
.pregnancy-timeline li {
    font-size: 0.95rem;
    margin-bottom: 10px;
    opacity: 0.95;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 5px; /* Add gap for wrapped items */
}
.pregnancy-timeline li strong {
    font-weight: bold;
    margin-left: 5px; /* Add space between label and value in RTL */
}

/* Ensure the secondary CTA button is visible and styled correctly */
.result-card-pregnancy .secondary-cta {
    background-color: white;
    color: var(--cat-زنان-و-بارداری); /* Use category color for text */
    font-weight: bold;
    margin-top: 10px; /* Add some space above */
}
.result-card-pregnancy .secondary-cta:hover {
    background-color: #fff0f5; /* Light pink hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}