/*
  =================================================================
  فایل استایل اختصاصی محاسبه‌گر ضربان قلب هدف
  نسخه: 1.1 - بهینه‌سازی A11y
  =================================================================
*/

/* --- Input with Unit --- */
.input-wrapper .input-unit {
    position: absolute;
    left: 15px; /* For RTL */
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text-color);
    font-size: 0.9rem;
    font-weight: bold;
    pointer-events: none;
}

.input-wrapper input[type="number"] {
    padding-left: 65px; /* Space for the unit */
}
.form-group .info-text {
    font-size: 0.85rem;
    color: var(--light-text-color);
    margin-top: 5px;
}

/* --- Custom THR Result Card --- */
.result-card-thr {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius-base);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(20px);
    color: var(--text-color); /* Dark text on light bg */
    
    /* === Change 1: Add prefers-reduced-motion check === */
    @media (prefers-reduced-motion: no-preference) {
        transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    }
}

.result-card-thr.visible {
    opacity: 1;
    transform: translateY(0);
}

.result-card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.thr-summary {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap; /* Allow wrapping */
    gap: 10px; /* Add gap for wrapped items */
    background-color: var(--bg-color);
    padding: 10px 15px; /* Slightly more horizontal padding */
    border-radius: var(--border-radius-small);
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.thr-summary p {
    margin: 5px 0; /* Add vertical margin for wrapped items */
}
.thr-summary strong {
    font-weight: bold;
    color: var(--primary-color);
}

/* --- Zones Grid --- */
.zones-grid {
    display: grid;
    /* Adjust minmax for better fit, maybe 140px */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 
    gap: 15px;
    margin-bottom: 20px;
}

.zone-item {
    padding: 15px;
    border-radius: var(--border-radius-base);
    text-align: center;
    border-top: 5px solid; /* Color bar */
    background-color: var(--bg-color);
    
     /* === Change 2: Add prefers-reduced-motion check === */
    @media (prefers-reduced-motion: no-preference) {
        transition: var(--transition-fast);
    }
}
.zone-item:hover {
     @media (prefers-reduced-motion: no-preference) {
        transform: translateY(-3px);
    }
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.zone-item h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--light-text-color);
}

.zone-item .zone-range {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
    color: var(--text-color);
}

/* Zone Colors */
.zone-50 { border-color: #a0a0a0; } /* Grey */
.zone-60 { border-color: #74c0fc; } /* Light Blue */
.zone-70 { border-color: #51cf66; } /* Green */
.zone-80 { border-color: #ffc107; } /* Yellow */
.zone-90 { border-color: #e74c3c; } /* Red */

.result-card-thr .secondary-cta {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    margin-top: 10px; /* Added margin */
}
.result-card-thr .secondary-cta:hover {
    background-color: var(--secondary-color);
}