﻿/* دعم RTL لتوست */
body{
    font-size: 14px;
}
.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;
    }

/* ============================================================ */
/* ✅ Search Toggle Card                                         */
/* ============================================================ */
.search-toggle-card {
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    overflow: hidden;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

    .search-toggle-card:hover {
        border-color: #cbd5e1;
    }

    /* عند فتح البحث يتغير شكل الكارت */
    .search-toggle-card:has(.collapse.show) {
        border-color: #818cf8;
        box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
    }

.search-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

    .search-toggle-header:hover {
        background-color: #f8fafc;
    }

.search-toggle-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #6366f1;
    flex-shrink: 0;
}

.search-toggle-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    display: block;
    line-height: 1.2;
}

.search-toggle-subtitle {
    font-size: 0.7rem;
    color: #94a3b8;
    display: block;
    line-height: 1.2;
}

.search-toggle-arrow {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-arrow-icon {
    font-size: 0.75rem;
    color: #64748b;
    transition: transform 0.3s ease;
}

/* تدوير السهم عند الفتح */
.search-toggle-header[aria-expanded="true"] .search-arrow-icon,
.collapse.show ~ .search-toggle-header .search-arrow-icon {
    transform: rotate(180deg);
}

/* ============================================================ */
/* ✅ Search Panel Body                                          */
/* ============================================================ */
.search-panel-body {
    padding: 20px 22px 22px;
    border-top: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #fafbff 0%, #f8f9fc 100%);
}

/* ============================================================ */
/* ✅ Search Labels                                              */
/* ============================================================ */
.search-label {
    display: flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

    .search-label i {
        color: #818cf8;
        font-size: 0.72rem;
    }

/* ============================================================ */
/* ✅ Search Field Wrapper                                       */
/* ============================================================ */
.search-field-wrapper {
    position: relative;
}

.search-field-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0b8c8;
    font-size: 0.82rem;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s ease;
}

/* ============================================================ */
/* ✅ Radzen Override                                             */
/* ============================================================ */
.search-radzen .rz-dropdown {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 9px 36px 9px 12px !important;
    font-size: 0.85rem !important;
    background: white !important;
    transition: all 0.25s ease !important;
    min-height: 42px !important;
    color: #334155 !important;
}

    .search-radzen .rz-dropdown:hover {
        border-color: #c7d2fe !important;
        background: #fafbff !important;
    }

    .search-radzen .rz-dropdown:focus,
    .search-radzen .rz-dropdown.rz-focus {
        border-color: #818cf8 !important;
        box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.12) !important;
        background: white !important;
    }

    .search-radzen .rz-dropdown::placeholder {
        color: #b0b8c8;
    }

/* ============================================================ */
/* ✅ Date Input                                                  */
/* ============================================================ */
.search-date-input {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 36px 9px 12px;
    font-size: 0.85rem;
    background: white;
    transition: all 0.25s ease;
    width: 100%;
    color: #334155;
    height: 42px;
}

    .search-date-input:hover {
        border-color: #c7d2fe;
        background: #fafbff;
    }

    .search-date-input:focus {
        border-color: #818cf8;
        box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.12);
        background: white;
        outline: none;
    }

/* ============================================================ */
/* ✅ Search Button                                               */
/* ============================================================ */
.btn-search {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex-grow: 1;
    justify-content: center;
    height: 42px;
}

    .btn-search:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
        background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    }

    .btn-search:active {
        transform: translateY(0);
        box-shadow: 0 1px 4px rgba(99, 102, 241, 0.2);
    }

/* ============================================================ */
/* ✅ Reset Button                                                */
/* ============================================================ */
.btn-reset {
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .btn-reset:hover {
        background: #fef2f2;
        border-color: #fecaca;
        color: #ef4444;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
    }

    .btn-reset:active {
        transform: translateY(0);
    }

/* ============================================================ */
/* ✅ Responsive                                                  */
/* ============================================================ */
@media (max-width: 992px) {
    .search-panel-body {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .search-toggle-header {
        padding: 10px 14px;
    }

    .search-panel-body {
        padding: 14px;
    }

    .btn-search {
        padding: 9px 12px;
        font-size: 0.78rem;
    }
}

@media (max-width: 576px) {
    .search-label {
        font-size: 0.72rem;
        margin-bottom: 5px;
    }

    .search-toggle-subtitle {
        display: none;
    }
}

/*---- تفاصيل الخطه للموظف و اللوكيشن----*/
<!-- ============================================================ -->
<!-- ✅ CSS Styles - تصميم Timeline للأحداث -->
<!-- ============================================================ -->
 
/* ---- Modern Table Styling ---- */
.table-modern {
    font-size: 0.85rem;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
    padding: 12px 15px;
    white-space: nowrap;
}

.table-modern tbody td {
    padding: 14px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
    transition: background-color 0.2s ease;
}

.table-modern tbody tr:hover {
    background-color: #f8f9fa;
}

.table-modern tbody tr.row-completed {
    background-color: #f8fff9;
}

    .table-modern tbody tr.row-completed:hover {
        background-color: #eafaf1;
    }

/* ---- Sequence Badge ---- */
.sequence-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.3);
}

/* ============================================================ */
/* ✅ EVENT TIMELINE DESIGN - التصميم الجديد                   */
/* ============================================================ */

.events-timeline-section {
    /* الحاوية العامة */
}

.chip-note {
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #495057;
    border-left: 3px solid #6c757d;
    white-space: normal;
    word-break: break-word;
    line-height: 1.5;
    margin-bottom: 10px;
}

.events-count-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #6f42c1, #8b5cf6);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(111, 66, 193, 0.25);
}

/* ---- الخط العمودي للـ Timeline ---- */
.event-timeline {
    position: relative;
    padding-left: 24px;
    margin-top: 4px;
}

    .event-timeline::before {
        content: '';
        position: absolute;
        left: 6px;
        top: 8px;
        bottom: 8px;
        width: 2px;
        background: linear-gradient(to bottom, #c4b5fd, #a78bfa, #8b5cf6);
        border-radius: 2px;
        opacity: 0.6;
    }

/* ---- كل عنصر في الـ Timeline ---- */
.event-timeline-item {
    position: relative;
    padding-bottom: 10px;
}

    .event-timeline-item:last-child {
        padding-bottom: 0;
    }

/* ---- النقطة الملونة على الخط ---- */
.event-timeline-dot {
    position: absolute;
    left: -24px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2.5px solid white;
    z-index: 2;
    transition: transform 0.2s ease;
}

.event-timeline-item:hover .event-timeline-dot {
    transform: scale(1.3);
}

/* ---- محتوى كل حدث ---- */
.event-timeline-content {
    min-width: 0;
}

.event-timeline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

/* ---- وقت الحدث (شارة صغيرة) ---- */
.event-time-badge {
    display: inline-block;
    background: #f1f3f5;
    color: #495057;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 72px;
    text-align: center;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    letter-spacing: 0.3px;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

/* ---- اسم نوع الحدث (شارة ملونة) ---- */
.event-type-chip {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0.5px 1px rgba(0,0,0,0.2);
    flex-shrink: 1;
    min-width: 0;
}

/* ---- وصف الحدث ---- */
.event-desc-inline {
    color: #6c757d;
    font-size: 0.78rem;
    margin-top: 3px;
    padding-left: 0;
    line-height: 1.45;
    white-space: normal;
    word-break: break-word;
}

/* ============================================================ */
/* ✅ زر اللوكيشن لكل حدث                                      */
/* ============================================================ */
.btn-event-loc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid #dee2e6;
    background: white;
    color: #0d6efd;
    font-size: 0.68rem;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.7;
}

    .btn-event-loc:hover {
        background: #0d6efd;
        color: white;
        border-color: #0d6efd;
        transform: scale(1.15);
        box-shadow: 0 2px 8px rgba(13, 110, 253, 0.35);
        opacity: 1;
    }

    .btn-event-loc:active {
        transform: scale(0.95);
    }

/* ============================================================ */
/* ✅ زر إظهار كل أحداث الزيارة على الخريطة                    */
/* ============================================================ */
.btn-visit-events {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid #6f42c1;
    background: white;
    color: #6f42c1;
    font-size: 0.85rem;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-visit-events:hover {
        background: #6f42c1;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(111, 66, 193, 0.35);
    }

    .btn-visit-events:active {
        transform: translateY(0);
    }

/* ---- Action Buttons ---- */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}

    .btn-group-sm .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

/* ---- Map Modal Fullscreen ---- */
.map-fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    border: none !important;
}

    .map-fullscreen-active #map {
        height: 100vh !important;
        width: 100vw !important;
    }

    .map-fullscreen-active #mapFullscreenBtn {
        top: 16px !important;
        right: 16px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(10px);
    }

body.map-fs-no-scroll {
    overflow: hidden !important;
}

.map-fullscreen-active ~ .modal-backdrop {
    z-index: 99998 !important;
}

.fullscreen-exit-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    pointer-events: none;
    animation: hintFadeOut 0.5s ease 2.5s forwards;
}

@@keyframes hintFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    text-decoration: none;
    font-weight: 500;
}

/* ---- Responsive adjustments ---- */
@@media (max-width: 1400px) {
    .event-type-chip {
        max-width: 140px;
    }
}

@@media (max-width: 1200px) {
    .event-type-chip {
        max-width: 110px;
        font-size: 0.65rem;
    }

    .event-time-badge {
        min-width: 64px;
        font-size: 0.65rem;
    }
}
 