﻿/*
 * HajjPages.css
 * ستايلات مشتركة لصفحات الحاج — تعتمد على CSS Variables من الثيم
 * تُضاف في App.razor أو wwwroot/css/app.css
 * =====================================================================
 */

/* ══════════════════════════════════════════════════════
   رأس الصفحة (Page Header) — مشترك بين كل الصفحات
══════════════════════════════════════════════════════ */
.haj-page-header {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 14px;
    color: #fff;
    text-align: center;
}

.haj-page-header-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: .75;
    margin-bottom: 4px;
}

.haj-page-header-icon {
    font-size: 36px;
    opacity: .85;
    margin-bottom: 6px;
}

.haj-page-header-main {
    font-size: 18px;
    font-weight: 700;
}

/* شارة في الرأس */
.haj-badge {
    display: inline-block;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    padding: 3px 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════
   قسم المعلومات (Info Section)
══════════════════════════════════════════════════════ */
.haj-section {
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.07);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.haj-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.haj-section-title i { color: var(--primary) !important; }

/* صف البيانات */
.haj-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0,0,0,.05);
    direction: rtl;
}

.haj-info-row:last-child { border-bottom: none; }

.haj-info-label {
    font-size: 12px;
    color: #6B8C80;
    min-width: 75px;
    flex-shrink: 0;
}

.haj-info-value {
    font-size: 13px;
    color: #2C3E35;
    font-weight: 600;
    flex: 1;
    padding-right: 8px;
    text-align: left;
}

/* زر تعديل داخل الصف */
.haj-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    padding: 2px 5px;
    border-radius: 6px;
    font-size: 14px;
    flex-shrink: 0;
    transition: color .15s;
}

.haj-edit-btn:hover { color: var(--primary-dark); }

/* ══════════════════════════════════════════════════════
   أزرار التواصل
══════════════════════════════════════════════════════ */
.haj-contact-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.haj-contact-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.haj-contact-btn:active { opacity: .8; }

/* ══════════════════════════════════════════════════════
   الحوار (Dialog)
══════════════════════════════════════════════════════ */
.haj-dialog-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.haj-dialog {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.haj-dialog-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    direction: rtl;
}

.haj-dialog-header i   { font-size: 16px; }
.haj-dialog-header span { font-size: 15px; font-weight: 700; }

.haj-dialog-body   { padding: 16px; direction: rtl; }

.haj-dialog-footer {
    padding: 8px 16px 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* أزرار الحوار */
.haj-btn-save {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity .15s;
}

.haj-btn-save:hover { opacity: .88; }

.haj-btn-delete {
    background: none;
    color: #C62828;
    border: 1.5px solid #C62828;
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.haj-btn-cancel {
    background: none;
    color: #6B8C80;
    border: 1.5px solid rgba(0,0,0,.12);
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* حقول الإدخال */
.haj-input, .haj-select, .haj-textarea {
    width: 100%;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #2C3E35;
    background: rgba(255,255,255,.8);
    outline: none;
    direction: rtl;
    box-sizing: border-box;
    font-family: inherit;
}

.haj-input:focus,
.haj-select:focus,
.haj-textarea:focus    { border-color: var(--primary); }

.haj-select            { appearance: none; cursor: pointer; }
.haj-textarea          { resize: vertical; min-height: 110px; }

.haj-field-label {
    font-size: 12px;
    color: #6B8C80;
    margin-bottom: 4px;
    display: block;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════
   حالة فارغة (Empty State)
══════════════════════════════════════════════════════ */
.haj-empty {
    text-align: center;
    padding: 56px 20px;
    color: #6B8C80;
}

.haj-empty i { font-size: 52px; opacity: .3; color: var(--primary); }
.haj-empty p { margin-top: 14px; font-size: 14px; }

/* ══════════════════════════════════════════════════════
   بطاقة موقع (Location Card)
══════════════════════════════════════════════════════ */
.haj-loc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,.8);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.07);
    padding: 14px 16px;
    margin-bottom: 10px;
    text-decoration: none;
    direction: rtl;
    transition: background .15s, transform .12s;
    cursor: pointer;
}

.haj-loc-card:active { transform: scale(.98); }

.haj-loc-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.haj-loc-title {
    font-size: 14px;
    font-weight: 700;
    color: #2C3E35;
    flex: 1;
}

.haj-loc-sub {
    font-size: 11px;
    color: #6B8C80;
    margin-top: 2px;
}

.haj-loc-arrow { color: #6B8C80; font-size: 12px; }

/* ══════════════════════════════════════════════════════
   خريطة الأسرّة (Bed Map)
══════════════════════════════════════════════════════ */
.haj-tent-map {
    background: rgba(255,255,255,.8);
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,.07);
    overflow: hidden;
}

.haj-bed-row {
    display: grid;
    grid-template-columns: 1fr 44px 1fr;
    align-items: stretch;
    border-bottom: 1px solid rgba(0,0,0,.05);
    min-height: 48px;
}

.haj-bed-row:last-child { border-bottom: none; }

.haj-bed-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
}

.haj-bed-right {
    flex-direction: row;
    justify-content: flex-end;
    text-align: right;
    direction: rtl;
}

.haj-bed-left {
    flex-direction: row-reverse;
    justify-content: flex-end;
    text-align: left;
    direction: ltr;
}

.haj-bed-icon  { font-size: 18px; flex-shrink: 0; }
.haj-bed-no    { font-size: 10px; color: #6B8C80; font-weight: 700; }
.haj-bed-name  { font-size: 12px; color: #2C3E35; font-weight: 600; }

/* حالات السرير — الألوان ثابتة لأنها دلالية */
.haj-bed-mine  { background: rgba(21,101,192,.08); }
.haj-bed-mine  .haj-bed-icon { color: #1565C0; }
.haj-bed-free  .haj-bed-icon { color: #2E7D32; }
.haj-bed-taken { background: rgba(198,40,40,.06); }
.haj-bed-taken .haj-bed-icon { color: #C62828; }

/* ممر الخيمة */
.haj-aisle {
    background: rgba(0,0,0,.02);
    border-right: 1px solid rgba(0,0,0,.06);
    border-left:  1px solid rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ══════════════════════════════════════════════════════
   بطاقة الشكوى (Complaint Card)
══════════════════════════════════════════════════════ */
.haj-complaint-card {
    background: rgba(255,255,255,.8);
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.07);
    padding: 14px;
    cursor: pointer;
    direction: rtl;
    transition: background .12s;
    margin-bottom: 8px;
}

.haj-complaint-card:active { background: rgba(0,0,0,.03); }

/* شرائح فلتر الحالة */
.haj-filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    direction: rtl;
    flex-wrap: wrap;
}

.haj-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid rgba(0,0,0,.1);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255,255,255,.8);
    color: #6B8C80;
    transition: all .15s;
}

.haj-filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.haj-filter-chip.active i { color: #fff !important; }
