/*
 * العمالة بالساعة — مكونات لا تغطيها أدوات Tailwind المترجمة: عناصر تنشئها السكربتات (بطاقات الأوقات والعاملات)
 * وحالات تفاعلية (خطوات الحجز، شاشة تحديد الموقع، نافذة الموعد). ألوان هوية بلاتينيوم:
 * أزرق #005ca9، سماوي #23b7d9، ذهبي #f4c532، خلفية #f6f7f9، خط Cairo.
 */
.hr-locate-open, .hr-locate-open body { overflow: hidden; }

/* ===== الأزرار والحقول ===== */
.hr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 2.875rem; padding: 0 1.5rem; border-radius: 9999px; border: 1px solid transparent; white-space: nowrap;
    background: #005ca9; color: #fff; font: 600 .875rem/1.4 "Cairo", sans-serif;
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease; cursor: pointer;
}
.hr-btn:hover:not(:disabled) { transform: translateY(-1px); background: #004f92; }
.hr-btn:focus-visible { outline: 2px solid #23b7d9; outline-offset: 2px; }
.hr-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.hr-btn--ghost { background: #fff; color: #005ca9; border-color: rgba(0, 92, 169, .25); }
.hr-btn--ghost:hover:not(:disabled) { background: rgba(0, 92, 169, .08); }
.hr-btn--danger { background: #fff; color: #dc2626; border-color: rgba(220, 38, 38, .3); }
.hr-btn--danger:hover:not(:disabled) { background: rgba(220, 38, 38, .06); }
.hr-btn--accent { background: #005ca9; box-shadow: 0 12px 28px rgba(0, 92, 169, .28); }
.hr-btn--sm { min-height: 2.25rem; padding: 0 .9rem; font-size: .8rem; }
.hr-btn--block { width: 100%; }

.hr-field { display: flex; flex-direction: column; gap: .4rem; font-size: .8125rem; font-weight: 600; color: #020b17; }
.hr-field > small { font-weight: 400; color: rgba(17, 17, 17, .6); line-height: 1.6; }
.hr-field input, .hr-field select, .hr-field textarea, .hr-search-row input {
    width: 100%; min-height: 2.875rem; padding: .6rem .9rem; border: 1px solid rgba(17, 17, 17, .12); border-radius: .875rem;
    background: #fff; color: #020b17; font: 400 .875rem/1.5 "Cairo", sans-serif; transition: border-color 160ms ease, box-shadow 160ms ease;
}
.hr-field textarea { min-height: 4.5rem; resize: vertical; }
.hr-field input:focus, .hr-field select:focus, .hr-field textarea:focus, .hr-search-row input:focus {
    outline: none; border-color: #005ca9; box-shadow: 0 0 0 4px rgba(0, 92, 169, .12);
}
.hr-field input[readonly] { background: #f6f7f9; }
.hr-field input[type=file] { padding: .55rem; }
.hr-label { font-size: .875rem; font-weight: 700; color: #020b17; }
.hr-muted { font-size: .8125rem; line-height: 1.8; color: rgba(17, 17, 17, .6); }
.hr-error { font-size: .8125rem; line-height: 1.8; color: #dc2626; }
.hr-error--box { margin-bottom: 1rem; padding: .85rem 1rem; border: 1px solid #fecaca; border-radius: 1rem; background: #fef2f2; }
.hr-check { display: flex; align-items: center; gap: .6rem; padding: .75rem .9rem; border: 1px solid rgba(17, 17, 17, .1); border-radius: .875rem; background: #fff; font-size: .875rem; font-weight: 600; cursor: pointer; }
.hr-check input { width: 1.1rem; height: 1.1rem; accent-color: #005ca9; }

.hr-grid-2, .hr-grid-3 { display: grid; gap: 1rem; }
@media (min-width: 640px) { .hr-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hr-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hr-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.hr-actions--split { justify-content: space-between; }
@media (max-width: 639px) { .hr-actions .hr-btn { flex: 1 1 100%; } }

/* ===== الشرائح (المدن والخدمات وأحياء التغطية) ===== */
.hr-chip {
    display: inline-flex; align-items: center; gap: .35rem; min-height: 2.5rem; padding: 0 1rem; border-radius: 9999px; white-space: nowrap;
    border: 1px solid rgba(17, 17, 17, .1); background: #fff; color: rgba(17, 17, 17, .8);
    font: 600 .8125rem/1 "Cairo", sans-serif; transition: all 160ms ease; cursor: pointer;
}
.hr-chip:hover { border-color: rgba(0, 92, 169, .35); color: #005ca9; }
.hr-chip.is-active { background: #005ca9; border-color: #005ca9; color: #fff; box-shadow: 0 8px 20px rgba(0, 92, 169, .22); }
#hr-catalog.is-loading { opacity: .5; pointer-events: none; transition: opacity 160ms ease; }

/* ===== خطوات الحجز ===== */
.hr-stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1.25rem; counter-reset: step; }
.hr-stepper button {
    position: relative; display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3.25rem; padding: .5rem;
    border-radius: 1rem; border: 1px solid rgba(17, 17, 17, .08); background: #fff; color: rgba(17, 17, 17, .6);
    font: 700 .8125rem/1.3 "Cairo", sans-serif; cursor: pointer; transition: all 160ms ease;
}
.hr-stepper b { display: grid; place-content: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 9999px; background: #f6f7f9; color: #005ca9; font-size: .8125rem; }
.hr-stepper button[aria-selected=true] { border-color: #005ca9; color: #005ca9; box-shadow: 0 10px 24px rgba(0, 92, 169, .14); }
.hr-stepper button[aria-selected=true] b { background: #005ca9; color: #fff; }
.hr-stepper button.is-done b { background: #23b7d9; color: #fff; }
@media (max-width: 639px) { .hr-stepper button { flex-direction: column; gap: .25rem; font-size: .7rem; } }

.hr-card { padding: 1.25rem; border-radius: 1.5rem; background: #fff; box-shadow: 0 1px 3px rgba(2, 11, 23, .06); }
@media (min-width: 640px) { .hr-card { padding: 1.75rem; } }
.hr-card__title { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.hr-card__title > span { display: grid; place-content: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: .875rem; background: rgba(0, 92, 169, .08); color: #005ca9; }
.hr-card__title h2 { font-size: 1.05rem; font-weight: 800; color: #020b17; }
.hr-card__title p { margin-top: .1rem; font-size: .8125rem; color: rgba(17, 17, 17, .6); }
.hr-subform { margin-top: 1.25rem; padding: 1.25rem; border: 1px dashed rgba(0, 92, 169, .3); border-radius: 1.25rem; background: #f8fbfe; display: grid; gap: 1rem; }
.hr-subform h3 { font-size: .95rem; font-weight: 800; color: #005ca9; }
.hr-search-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: -.5rem; }
.hr-search-row input { flex: 1 1 14rem; width: auto; }
.hr-map { height: 20rem; border-radius: 1.25rem; overflow: hidden; border: 1px solid rgba(17, 17, 17, .08); background: #eef3f8; z-index: 0; }
.hr-legend { display: inline-flex; align-items: center; gap: .35rem; }
.hr-legend i { display: inline-block; width: .9rem; height: .9rem; border-radius: .25rem; border: 1.5px solid #005ca9; background: rgba(35, 183, 217, .25); }

/* ===== بطاقات الاختيار (الأوقات والعاملات) ===== */
.hr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem; }
.hr-option { position: relative; display: block; cursor: pointer; }
.hr-option input { position: absolute; opacity: 0; pointer-events: none; }
.hr-option__body {
    display: flex; flex-direction: column; align-items: center; gap: .2rem; height: 100%; padding: .75rem .5rem; text-align: center;
    border: 1.5px solid rgba(17, 17, 17, .1); border-radius: 1rem; background: #fff; transition: all 160ms ease;
}
.hr-option__body small { font-size: .7rem; color: rgba(17, 17, 17, .55); }
.hr-option__body strong { font-size: .95rem; font-weight: 800; color: #020b17; }
.hr-option__body img { width: 3.25rem; height: 3.25rem; margin-bottom: .25rem; border-radius: 9999px; object-fit: cover; }
.hr-option:hover .hr-option__body { border-color: rgba(0, 92, 169, .4); }
.hr-option input:checked + .hr-option__body { border-color: #005ca9; background: rgba(0, 92, 169, .06); box-shadow: 0 8px 20px rgba(0, 92, 169, .15); }
.hr-option input:checked + .hr-option__body strong { color: #005ca9; }
.hr-option input:focus-visible + .hr-option__body { outline: 2px solid #23b7d9; outline-offset: 2px; }
.hr-option input:disabled + .hr-option__body { opacity: .45; cursor: not-allowed; }
.hr-option--worker .hr-option__body strong { font-size: .8125rem; }

/* ===== طرق الدفع والملخص ===== */
.hr-pay { position: relative; display: block; cursor: pointer; }
.hr-pay input { position: absolute; opacity: 0; pointer-events: none; }
.hr-pay__body { display: flex; align-items: center; gap: .7rem; height: 100%; padding: .9rem 1rem; border: 1.5px solid rgba(17, 17, 17, .1); border-radius: 1rem; background: #fff; font-size: .875rem; font-weight: 700; color: #020b17; transition: all 160ms ease; }
.hr-pay__icon { display: grid; place-content: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: .75rem; background: #f6f7f9; color: #005ca9; }
.hr-pay__check { display: grid; place-content: center; flex: none; width: 1.25rem; height: 1.25rem; margin-inline-start: auto; border-radius: 9999px; border: 1.5px solid rgba(17, 17, 17, .2); color: transparent; }
.hr-pay input:checked + .hr-pay__body { border-color: #005ca9; background: rgba(0, 92, 169, .05); }
.hr-pay input:checked + .hr-pay__body .hr-pay__icon { background: #005ca9; color: #fff; }
.hr-pay input:checked + .hr-pay__body .hr-pay__check { border-color: #005ca9; background: #005ca9; color: #fff; }
.hr-pay input:focus-visible + .hr-pay__body { outline: 2px solid #23b7d9; outline-offset: 2px; }
.hr-summary { border-radius: 1.25rem; background: #f6f7f9; padding: .5rem 1rem; }
.hr-summary__line { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid rgba(17, 17, 17, .06); font-size: .8125rem; }
.hr-summary__line:last-child { border-bottom: 0; }
.hr-summary__line span { color: rgba(17, 17, 17, .6); }
.hr-summary__line strong { color: #020b17; text-align: end; }
.hr-summary__line.is-total { margin: .25rem -1rem; padding: .9rem 1rem; border-radius: 1rem; background: rgba(0, 92, 169, .08); border: 0; }
.hr-summary__line.is-total span, .hr-summary__line.is-total strong { color: #005ca9; font-weight: 800; font-size: .95rem; }

/* ===== شاشة «حدد موقعك» ===== */
.hr-locate { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 1rem; background: rgba(2, 11, 23, .55); backdrop-filter: blur(4px); }
.hr-locate[hidden] { display: none; }
.hr-locate__box { position: relative; width: min(100%, 28rem); max-height: calc(100vh - 2rem); overflow: auto; border-radius: 1.75rem; background: #fff; box-shadow: 0 30px 70px rgba(2, 11, 23, .3); font-family: "Cairo", sans-serif; }
.hr-locate.is-map .hr-locate__box { width: min(100%, 44rem); }
.hr-locate__close { position: absolute; top: 1rem; inset-inline-end: 1rem; z-index: 2; display: grid; place-content: center; width: 2.25rem; height: 2.25rem; border-radius: 9999px; background: #f6f7f9; color: #020b17; cursor: pointer; }
.hr-locate__choose { padding: 2.25rem 1.5rem 1.75rem; text-align: center; background: url(/assets/images/grid-bg.svg) top center / cover no-repeat; }
.hr-locate__icon { display: inline-grid; place-content: center; width: 4.5rem; height: 4.5rem; border-radius: 1.5rem; background: #005ca9; color: #fff; box-shadow: 0 16px 34px rgba(0, 92, 169, .32); }
.hr-locate__choose h2 { margin-top: 1rem; font-size: 1.5rem; font-weight: 800; color: #020b17; }
.hr-locate__choose > p { margin-top: .35rem; font-size: .875rem; color: rgba(17, 17, 17, .6); }
.hr-locate__options { display: grid; gap: .6rem; margin-top: 1.5rem; }
.hr-locate__option { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3.1rem; border-radius: 9999px; border: 1px solid rgba(0, 92, 169, .22); background: #fff; color: #005ca9; font: 700 .9rem/1 "Cairo", sans-serif; cursor: pointer; transition: all 160ms ease; }
.hr-locate__option:hover { background: rgba(0, 92, 169, .06); }
.hr-locate__option.is-primary { background: #005ca9; border-color: #005ca9; color: #fff; }
.hr-locate__option.is-primary:hover { background: #004f92; }
.hr-locate__option.is-busy, .hr-locate__gps.is-busy { opacity: .6; pointer-events: none; }
.hr-locate__skip { display: inline-block; margin-top: 1.1rem; font-size: .8125rem; font-weight: 600; color: rgba(17, 17, 17, .6); text-decoration: underline; text-underline-offset: 4px; }
.hr-locate__skip:hover { color: #005ca9; }
.hr-locate__panel { display: grid; gap: 1rem; padding: 1.5rem; }
.hr-locate__panel[hidden], .hr-locate__choose[hidden] { display: none; }
.hr-locate__head { display: flex; align-items: flex-start; gap: .75rem; padding-inline-end: 2.5rem; }
.hr-locate__head h2 { font-size: 1.1rem; font-weight: 800; color: #020b17; }
.hr-locate__head p { font-size: .8125rem; color: rgba(17, 17, 17, .6); }
.hr-locate__back { display: grid; place-content: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 9999px; background: #f6f7f9; color: #005ca9; cursor: pointer; }
.hr-locate__stage { position: relative; height: min(56vh, 26rem); border-radius: 1.25rem; overflow: hidden; background: #eef3f8; }
.hr-locate__map { position: absolute; inset: 0; z-index: 0; }
.hr-locate__pin { position: absolute; left: 50%; top: 50%; z-index: 500; width: 2.25rem; transform: translate(-50%, -100%); pointer-events: none; transition: transform 160ms ease; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .25)); }
.hr-locate__pin svg { display: block; fill: #005ca9; }
.hr-locate__pin.is-moving { transform: translate(-50%, -118%); }
.hr-locate__search { position: absolute; top: .75rem; inset-inline: .75rem; z-index: 600; display: flex; align-items: center; gap: .5rem; padding: .35rem .35rem .35rem .9rem; border-radius: 9999px; background: #fff; box-shadow: 0 10px 25px rgba(2, 11, 23, .15); }
[dir=rtl] .hr-locate__search { padding: .35rem .9rem .35rem .35rem; }
.hr-locate__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 .875rem "Cairo", sans-serif; }
.hr-locate__search button { min-height: 2.25rem; padding: 0 1rem; border-radius: 9999px; background: #005ca9; color: #fff; font: 700 .8125rem "Cairo", sans-serif; cursor: pointer; }
.hr-locate__gps { position: absolute; bottom: .9rem; inset-inline-end: .9rem; z-index: 600; display: grid; place-content: center; width: 2.75rem; height: 2.75rem; border-radius: 9999px; background: #fff; color: #005ca9; box-shadow: 0 8px 20px rgba(2, 11, 23, .18); cursor: pointer; }
.hr-locate__foot { display: grid; gap: .75rem; }
.hr-locate__address { display: flex; align-items: center; gap: .75rem; padding: .8rem; border-radius: 1rem; background: #f6f7f9; }
.hr-locate__address > span { display: grid; place-content: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: .875rem; background: rgba(0, 92, 169, .1); color: #005ca9; }
.hr-locate__address small { display: block; font-size: .72rem; color: rgba(17, 17, 17, .55); }
.hr-locate__address strong { display: block; font-size: .875rem; color: #020b17; }
.hr-locate .hr-field select { min-height: 3rem; }

/* ===== نافذة الموعد ===== */
.hr-dialog { width: min(calc(100% - 2rem), 34rem); padding: 0; border: 0; border-radius: 1.5rem; box-shadow: 0 30px 70px rgba(2, 11, 23, .3); font-family: "Cairo", sans-serif; }
.hr-dialog::backdrop { background: rgba(2, 11, 23, .55); backdrop-filter: blur(3px); }
.hr-dialog__head { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid rgba(17, 17, 17, .06); }
.hr-dialog__head > span { display: grid; place-content: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: .875rem; background: #005ca9; color: #fff; }
.hr-dialog__head h2 { font-size: 1.05rem; font-weight: 800; color: #020b17; }
.hr-dialog__head p { font-size: .8rem; color: rgba(17, 17, 17, .6); }
.hr-dialog__close { display: grid; place-content: center; width: 2.25rem; height: 2.25rem; margin-inline-start: auto; border-radius: 9999px; background: #f6f7f9; cursor: pointer; }
.hr-dialog__body { padding: 1.25rem; max-height: 60vh; overflow: auto; }
.hr-dialog__foot { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.25rem; border-top: 1px solid rgba(17, 17, 17, .06); background: #f6f7f9; }

/* Leaflet فوق رأس الموقع الثابت لا تحته */
.leaflet-container { font-family: "Cairo", sans-serif; }

/* ===== تنبيه «لديك حجز قائم في هذا اليوم» في خطوة الموعد ===== */
.hr-existing { padding: 1rem; border: 1px solid #fde68a; border-radius: 1.25rem; background: #fffbeb; }
.hr-existing[hidden] { display: none; }
.hr-existing__head { display: flex; align-items: flex-start; gap: .75rem; }
.hr-existing__icon { display: grid; place-content: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: .875rem; background: #fef3c7; color: #b45309; }
.hr-existing__icon svg, .hr-existing__date svg { width: 1.25rem; height: 1.25rem; }
.hr-existing__title { display: block; font-size: .95rem; font-weight: 800; color: #78350f; }
.hr-existing__text { margin-top: .2rem; font-size: .8125rem; line-height: 1.8; color: #92400e; }
.hr-existing__list { display: grid; gap: .5rem; margin-top: .85rem; }
.hr-existing__item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .7rem .85rem; border: 1px solid rgba(180, 83, 9, .15); border-radius: 1rem; background: #fff; }
.hr-existing__info { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.hr-existing__number { display: inline-flex; align-items: center; padding: .25rem .7rem; border-radius: 9999px; background: rgba(0, 92, 169, .08); color: #005ca9; font-size: .8rem; font-weight: 800; }
.hr-existing__date { display: inline-flex; align-items: center; gap: .35rem; font-size: .8125rem; font-weight: 700; color: #020b17; }
.hr-existing__date svg { width: 1rem; height: 1rem; color: rgba(17, 17, 17, .5); }
.hr-existing__link { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 1rem; border-radius: 9999px; background: #005ca9; color: #fff; font-size: .8rem; font-weight: 700; white-space: nowrap; transition: background-color 160ms ease; }
.hr-existing__link:hover { background: #004f92; }
