/* ==========================================================================
   Ahsan4Life Body Fat Calculator Tool Styles (style.css)
   ========================================================================== */

/* استدعاء خط Cairo لضمان ثبات المظهر داخل الحاسبة */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

/* الحاوية الخارجية للأداة */
.ahsan-calc-wrapper {
    max-width: 520px;
    margin: 20px auto;
    padding: 30px 25px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    font-family: 'Cairo', sans-serif;
    text-align: right;
    direction: rtl;
    box-sizing: border-box;
}

/* عنوان الحاسبة */
.ahsan-calc-wrapper h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a8a;
    margin-top: 0;
    margin-bottom: 24px;
    text-align: center;
    border-bottom: 2px solid #eff6ff;
    padding-bottom: 12px;
}

/* مجموعات الإدخال */
.ahsan-input-group {
    margin-bottom: 16px;
    text-align: right;
}

.ahsan-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

/* أزرار الاختيار العصري للجنس (Radio Toggle) */
.ahsan-gender-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ahsan-gender-toggle input[type="radio"] {
    display: none;
}

.ahsan-gender-label {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    color: #64748b;
    transition: all 0.2s ease;
}

.ahsan-gender-toggle input[type="radio"]:checked + .ahsan-gender-label {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

/* حقول إدخال الأرقام */
.ahsan-calc-wrapper input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    color: #334155;
    background-color: #f8fafc;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ahsan-calc-wrapper input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* زر الحساب الرئيسي */
.ahsan-calc-btn {
    width: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.ahsan-calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.3);
}

/* حاوية النتائج والأخطاء */
#ahsan-result {
    margin-top: 25px;
    border-radius: 16px;
}

.ahsan-alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.ahsan-alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fec2c2;
    color: #dc2626;
}

/* لوحة التقرير الصوري (Dashboard) */
.ahsan-dashboard-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    position: relative;
    box-sizing: border-box;
}

.ahsan-dash-header {
    text-align: center;
    margin-bottom: 25px;
}

.ahsan-dash-header .main-percentage {
    font-size: 42px;
    font-weight: 800;
    display: block;
    line-height: 1.1;
}

.ahsan-dash-header .main-status {
    font-size: 15px;
    font-weight: 700;
    margin-top: 8px;
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
}

/* شريط المقياس الملون التفاعلي */
.ahsan-gauge-container {
    margin: 30px 10px 20px 10px;
    position: relative;
}

.ahsan-gauge-bar {
    height: 16px;
    background: linear-gradient(to left, #ef4444 0%, #f97316 25%, #eab308 50%, #3b82f6 75%, #22c55e 100%);
    border-radius: 10px;
    position: relative;
}

.ahsan-gauge-pointer {
    position: absolute;
    top: -12px;
    transform: translateX(50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ahsan-pointer-arrow {
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 10px solid #1e293b;
}

.ahsan-pointer-val {
    font-size: 12px;
    font-weight: 800;
    background: #1e293b;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.ahsan-gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-top: 8px;
    padding: 0 4px;
}

/* جدول البيانات التفصيلي الكربوني */
.ahsan-dash-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.ahsan-dash-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.ahsan-dash-table td {
    padding: 10px 6px;
    color: #334155;
}

.ahsan-dash-table td.td-label {
    font-weight: 600;
    color: #64748b;
    text-align: right;
}

.ahsan-dash-table td.td-val {
    font-weight: 700;
    text-align: left;
    color: #1e293b;
}

/* الهوية التجارية والعلامة المائية داخل الصورة */
.ahsan-image-branding {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px dashed #e2e8f0;
}

.ahsan-brand-logo {
    font-size: 16px;
    font-weight: 800;
    color: #1e3a8a;
}

.ahsan-brand-url {
    font-size: 13px;
    font-weight: 700;
    color: #3b82f6;
    letter-spacing: 0.5px;
}

/* أزرار الإجراءات (حفظ / مشاركة) */
.ahsan-dash-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.ahsan-action-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.ahsan-action-btn:hover {
    background: #ffffff;
    color: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

/* فئات الألوان التفاعلية للحالات والنتائج */
.txt-green { color: #16a34a !important; }
.txt-blue { color: #1d4ed8 !important; }
.txt-orange { color: #ea580c !important; }
.txt-red { color: #dc2626 !important; }

.bg-green { background: #f0fdf4 !important; }
.bg-blue { background: #eff6ff !important; }
.bg-orange { background: #fff7ed !important; }
.bg-red { background: #fef2f2 !important; }