﻿/* دعم RTL لتوست */
body {
    font-size: 14px;
    font-family: 'Cairo', Segoe UI;
}
@font-face {
    font-family: 'Cairo';
    src: url('/assets/fonts/Cairo-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    /*font-weight: 400;*/
}

@font-face {
    font-family: 'Cairo';
    src: url('/assets/fonts/Cairo-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    /*font-weight: 700;*/
}
.blazored-toast-container {
    direction: rtl;
    text-align: right;
    margin-top: 1.5rem;
    z-index: 1500;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* تحسين مظهر الرسائل في RTL */
.blazored-toast {
    border-radius: 0.5rem;
    font-size: 1rem;
    padding: 0.5rem;
    margin: 0.3rem;
}

    .blazored-toast .blazored-toast-icon {
        margin-inline-end: 0.5rem; /* 0.5rem = حوالي 8px */
    }

.sidebar-menu {
    font-size: 14px;
}

h6 {
    font-size: 10px;
}

h5 {
    font-size: 12px;
}

h4 {
    font-size: 14px;
}

h3 {
    font-size: 16px;
}

h2 {
    font-size: 18px;
}

h1 {
    font-size: 20px;
}

.card-title {
    font-size: 16px;
}

.app-header {
    font-size: 16px;
}

.custom-whitespace {
    white-space: pre-line;
}

.h-row {
    transition: background-color 0.2s ease-in-out;
    padding: 5px 0px;
    border-radius: 6px;
}

    .h-row:hover {
        background-color: #e9ecef;
        cursor: pointer;
    }

.collapse {
    transition: all 0.25s ease-in-out;
    overflow: hidden;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pulse {
    animation: pulse 1.2s infinite;
}

/* تفعيل التفاف النص داخل الخلية */
.wrap-cell {
    white-space: normal !important;
    word-wrap: break-word;
    word-break: break-word;
}

/* لو تريد كل الخلايا تعمل Wrap */
.my-grid .rz-data-grid-cell {
    white-space: normal !important;
}

.table-wrapper {
    position: relative;
}

.table-loading-overlay {
    position: absolute;
    top: 0; /* يغطي من أعلى */
    left: 0;
    width: 100%;
    height: 100%; /* يغطي كل الطول حتى لو فيه scroll */
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}


/*************************************
 * 1) Hover لجميع الصفوف (عام)
 *************************************/
.rz-datatable-table tr:hover > td,
.rz-datatable tr:hover > td,
.rz-datagrid tr:hover > td,
.rz-data-grid tr:hover > td,
.rz-data-grid-table tr:hover > td,
.rz-datatable-wrapper tr:hover > td,
.rz-grid tr:hover > td,
.rz-table tr:hover > td,
.rz-datatable tbody tr:hover > td {
    background-color: #e9ecef !important; /* لون هوفر عام */
    color: inherit !important;
}

    /* دعم العناصر الداخلية التي تملك background */
    .rz-datatable-table tr:hover > td .rz-cell-data,
    .rz-datagrid tr:hover > td .rz-cell-data,
    .rz-data-grid tr:hover > td .rz-cell-data,
    .rz-datatable tr:hover > td .rz-cell-data,
    .rz-data-grid-table tr:hover > td .rz-cell-data,
    .rz-datatable-wrapper tr:hover > td .rz-cell-data,
    .rz-grid tr:hover > td .rz-cell-data {
        background-color: transparent !important;
    }


/*************************************
 * 2) لون الصف الخطير (row-danger)
 *************************************/
.row-danger,
tr.row-danger > td {
    background-color: #f8d7da !important; /* نفس bootstrap danger */
}


/*************************************
 * 3) تعطيل الهوفر العام عن الصفوص الملوّنة
 *************************************/
.rz-datatable-table tr.row-danger:hover > td,
.rz-datatable tr.row-danger:hover > td,
.rz-datagrid tr.row-danger:hover > td,
.rz-data-grid tr.row-danger:hover > td,
.rz-data-grid-table tr.row-danger:hover > td,
.rz-datatable-wrapper tr.row-danger:hover > td,
.rz-grid tr.row-danger:hover > td,
.rz-table tr.row-danger:hover > td,
.rz-datatable tbody tr.row-danger:hover > td {
    background-color: #f5c2c7 !important; /* لون هوفر خاص للصف الخطر */
}


    /*************************************
 * 4) شفاف داخل الخلية عند hover
 *************************************/
    .rz-datatable-table tr.row-danger:hover > td .rz-cell-data,
    .rz-datagrid tr.row-danger:hover > td .rz-cell-data,
    .rz-data-grid tr.row-danger:hover > td .rz-cell-data,
    .rz-datatable tr.row-danger:hover > td .rz-cell-data,
    .rz-data-grid-table tr.row-danger:hover > td .rz-cell-data,
    .rz-datatable-wrapper tr.row-danger:hover > td .rz-cell-data,
    .rz-grid tr.row-danger:hover > td .rz-cell-data {
        background-color: transparent !important;
    }

.gradient-custom-2 {
    /* fallback for old browsers */
    background: #80d0ff;
    /* Chrome 10-25, Safari 5.1-6 */
    background: -webkit-linear-gradient(to left, #80d0ff, #4ca7ff, #1e7aff, #0056d6);
    /* Modern Browsers */
    background: linear-gradient(to left, #80d0ff, #4ca7ff, #1e7aff, #0056d6);
}

@media (min-width: 768px) {
    .gradient-form {
        height: 100vh !important;
    }
}

@media (min-width: 769px) {
    .gradient-custom-2 {
        border-top-left-radius: .3rem;
        border-bottom-left-radius: .3rem;
    }
}

 
.account-card {
    transition: all 0.3s ease;
    border: 1px solid #e4e6ef;
}

.account-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-header-custom {
    padding: 0.50rem;
    color: white;
    border-radius: 0.475rem 0.475rem 0 0 !important;
}

.section-header {
    position: relative;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e4e6ef, transparent);
}

.separator-dashed {
    background: repeating-linear-gradient(90deg, #e4e6ef, #e4e6ef 5px, transparent 5px, transparent 10px);
}

.overlay-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: baseline;
    z-index: 1050;
    border-radius: 0.475rem;
}

.required:after {
    content: " *";
    color: #f1416c;
}

.form-select-solid {
    background-color: #f5f8fa;
    border-color: #f5f8fa;
}

    .form-select-solid:focus {
        background-color: #fff;
        border-color: #009ef7;
        box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.25);
    }

 /**/

/* أنماط مخصصة إضافية */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* ألوان خلفيات فاتحة مخصصة */
.bg-success-light {
    background-color: rgba(40, 167, 69, 0.1) !important;
}


.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.form-select-lg {
    height: calc(3.5rem + 2px);
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
}

.table th {
    vertical-align: middle;
    padding: 1rem;
}

.table td {
    vertical-align: middle;
    padding: 0.75rem;
}

.badge {
    padding: 0.5em 0.8em;
    font-size: 0.85em;
}

.form-label.required:after {
    content: " *";
    color: #dc3545;
}