/* Hajj Local Application Styles */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

.navbar-brand {
    font-weight: bold;
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    font-weight: 600;
}

/* Pilgrim Card */
.pilgrim-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    height: 100%;
}

.pilgrim-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.pilgrim-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.pilgrim-info {
    padding: 1rem;
}

.pilgrim-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.pilgrim-details {
    font-size: 0.9rem;
    color: #666;
}

.pilgrim-details i {
    margin-left: 0.5rem;
    color: #007bff;
}

.badge-custom {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Reference Grid */
.reference-tile {
    width: 60px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    margin: 2px;
    cursor: pointer;
    transition: transform 0.1s;
}

.reference-tile:hover {
    transform: scale(1.1);
}

.reference-tile.status-pending {
    background-color: #e9ecef;
    color: #495057;
}

.reference-tile.status-imported {
    background-color: #28a745;
    color: white;
}

.reference-tile.status-complete {
    background-color: #198754;
    color: white;
}

.reference-tile.status-incomplete {
    background-color: #fd7e14;
    color: white;
}

.reference-tile.status-failed {
    background-color: #dc3545;
    color: white;
}

.reference-tile.status-none {
    background-color: #dee2e6;
    color: #868e96;
}

.reference-tile.category-none {
    border-right: 3px solid #adb5bd;
}

/* تصنيف المراجع: حجاج القرعة، محججين، أعضاء بعثة */
.category-card.category-lottery { background-color: rgba(13, 110, 253, 0.12); }
.category-card.category-lottery .category-dot { background-color: #0d6efd; }
.reference-tile.category-cat1 { border-right: 3px solid #0d6efd; }

.category-card.category-muhajjin { background-color: rgba(32, 201, 151, 0.2); }
.category-card.category-muhajjin .category-dot { background-color: #20c997; }
.reference-tile.category-cat2 { border-right: 3px solid #20c997; }

.category-card.category-mission { background-color: rgba(111, 66, 193, 0.15); }
.category-card.category-mission .category-dot { background-color: #6f42c1; }
.reference-tile.category-cat3 { border-right: 3px solid #6f42c1; }

.category-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.category-filter-badge {
    cursor: pointer;
    transition: opacity 0.15s, box-shadow 0.15s;
}
.category-filter-badge:hover {
    opacity: 0.9;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
}
.category-filter-badge.category-filter-active {
    box-shadow: 0 0 0 2px rgba(0,0,0,0.5);
    font-weight: 700;
}

/* Modal */
.modal-content {
    border-radius: 10px;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.modal-body embed,
.modal-body iframe {
    width: 100%;
    min-height: 500px;
    border: none;
    border-radius: 8px;
}

/* Progress Bar */
.progress {
    border-radius: 10px;
}

/* Charts */
canvas {
    max-height: 400px;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .form-label {
    text-align: right;
}

[dir="rtl"] .navbar-nav {
    margin-right: auto;
    margin-left: 0;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Table */
.table-responsive {
    max-height: 500px;
    overflow-y: auto;
}

/* Verification — بطاقات الولايات: صف أفقي (بطاقة 1 | بطاقة 2 | بطاقة 3 ...) */
.verification-wilaya-row {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    min-height: 100px;
}
.verification-wilaya-card {
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 140px;
    background: #fff;
    display: block;
}
.verification-wilaya-card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.25rem;
}
.verification-wilaya-card-stats .badge {
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .pilgrim-card {
        margin-bottom: 1rem;
    }
    
    .reference-tile {
        width: 50px;
        height: 35px;
        font-size: 0.7rem;
    }
    .verification-wilaya-card {
        min-width: 100px;
        max-width: 120px;
    }
}

/* إحصائيات البطاقات: صف أفقي قابل للتمرير */
.stats-cards-row {
    min-height: 120px;
    scroll-behavior: smooth;
}
.stats-cards-row .stats-card-col {
    flex-shrink: 0;
}

.stats-cards-horizontal {
    min-height: 120px;
    scroll-behavior: smooth;
}
.stats-cards-horizontal .stats-card-item {
    flex-shrink: 0;
}
