/* ==========================================================================
   register.css — نموذج التسجيل، خريطة المقاعد، التذكرة
   ========================================================================== */

.reg-hero .phero__in { padding-block: 28px 22px; }
[hidden] { display: none !important; }

.reg__form { display: block; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; clip: rect(0 0 0 0); clip-path: inset(50%); pointer-events: none; }
.reg__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; align-items: start; }
@media (max-width: 899px) { .reg__grid { grid-template-columns: minmax(0, 1fr); } }

.reg__panel { padding: 22px; min-width: 0; }
.reg__panel--map { position: relative; }
.reg__alert { display: none; background: #fdecec; color: #8a1c1c; border: 1px solid #f3b8b8; border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 16px; font-weight: 700; }
.reg__alert:not(:empty) { display: block; }
.reg__alert ul { margin: 0; padding-inline-start: 18px; }
.reg__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.btn--lg { font-size: 1.05rem; padding: 14px 30px; }
.btn--sm { padding: 8px 14px; font-size: .88rem; }

/* حقول */
.fld { margin-bottom: 16px; }
.fld label, .fld__lb { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; color: #00343a; }
.fld label b, .fld__lb b, .panel__h b { color: #c62828; font-weight: 700; }
.fld input[type="text"], .fld input[type="tel"], .fld input[type="email"] {
  width: 100%; padding: 12px 14px; border: 1.5px solid rgba(0, 52, 58, .2); border-radius: var(--r-sm); background: #fff; color: #0c2a2c;
  font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.fld input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(0, 137, 74, .14); }
.fld input.is-invalid, .field-validation-error + input { border-color: #c62828; }
.fld__err, .field-validation-error { display: block; color: #c62828; font-size: .85rem; margin-top: 5px; min-height: 0; }
.fld__err:empty { display: none; }
.fld__hint { color: rgba(12, 42, 44, .6); font-size: .85rem; margin: 6px 0 0; }
.input-validation-error { border-color: #c62828 !important; }

/* اختيار مجزأ (الجنس) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg--sm { display: inline-grid; grid-auto-flow: column; gap: 6px; }
.seg__opt { position: relative; cursor: pointer; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; }
.seg__opt span {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; border: 1.5px solid rgba(0, 52, 58, .2);
  border-radius: var(--r-sm); background: #fff; color: #00343a; font-weight: 700; transition: all .2s;
}
.seg--sm .seg__opt span { padding: 6px 12px; flex-direction: row; gap: 6px; font-size: .88rem; }
.seg__opt span i { font-size: 1.4rem; color: var(--green); }
.seg--sm .seg__opt span i { font-size: 1rem; }
.seg__opt span small { font-weight: 500; font-size: .78rem; color: rgba(12, 42, 44, .6); }
.seg__opt input:checked + span { border-color: var(--green); background: rgba(0, 137, 74, .1); box-shadow: 0 0 0 3px rgba(0, 137, 74, .15); }
.seg__opt input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.seg__opt.is-full span { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------- خريطة القاعة (SVG) */
.smap { position: relative; }
.smap__hallWrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 4px 0 6px; border-radius: 14px; background: #f7fbf8; border: 1px solid rgba(0, 52, 58, .1); }
.smap__hall { min-width: 420px; }
.smap__hallWrap::after { content: ""; }
.smap__scrollHint { display: none; font-size: .75rem; color: rgba(12, 42, 44, .55); text-align: center; margin-top: 6px; }
@media (max-width: 480px) { .smap__scrollHint { display: block; } }
.hall { display: block; width: 100%; height: auto; font-family: inherit; }
.smap--admin .smap__hall { max-width: 720px; margin: 0 auto; }
.smap--admin .smap__grid table { margin: 0 auto; }
.hall__stage { fill: #00343a; }
.hall__stageT { fill: #fff; font-size: 13px; font-weight: 700; letter-spacing: .5px; }
.hall__lvl { stroke: rgba(0, 52, 58, .3); stroke-width: 2; stroke-dasharray: 6 5; }
.hall__lvlT { fill: rgba(12, 42, 44, .6); font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.hz { cursor: pointer; transition: opacity .15s; }
.hz__bg { fill: color-mix(in srgb, var(--zc, #5aba1c) 12%, #fff); stroke: color-mix(in srgb, var(--zc, #5aba1c) 45%, #fff); stroke-width: 1.2; transition: stroke .15s, stroke-width .15s; }
.hz:hover .hz__bg { stroke: var(--zc, #5aba1c); stroke-width: 2; }
.hz.is-selected .hz__bg { stroke: #00894a; stroke-width: 3; fill: color-mix(in srgb, #00894a 16%, #fff); }
.hs { fill: var(--zc, #5aba1c); opacity: .85; }
.hs--taken { opacity: 1; }
.hs--in { stroke: #0c2a2c; stroke-width: 1.2; }
.hz--vip .hs { fill: #d9b84a; }
.hz--vip .hz__bg { fill: #fbf5e2; stroke: #d9c47a; }
.hz--locked { cursor: not-allowed; }
.hz--locked .hs { fill: #b9c2c4; }
.hz--locked .hz__bg { fill: #eef1f1; stroke: #ccd4d5; }
.hz--locked.hz--vip .hs { fill: #d9b84a; opacity: .5; }
.hz--locked.hz--vip .hz__bg { fill: #fbf5e2; stroke: #d9c47a; }
.hz__lbBg { fill: #fff; stroke: rgba(0, 52, 58, .18); }
.hz.is-selected .hz__lbBg { fill: #00894a; stroke: #00894a; }
.hz__lb { fill: #00343a; font-size: 11px; font-weight: 800; letter-spacing: .5px; }
.hz.is-selected .hz__lb { fill: #fff; }
.hz__sub { fill: rgba(12, 42, 44, .7); font-size: 8.5px; font-weight: 600; }
.hz--locked .hz__sub { fill: #8a6d1d; }

.smap__legend { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 14px; font-size: .8rem; color: rgba(12, 42, 44, .7); }
.smap__legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0, 52, 58, .2); }
.lg--free { background: #9ad67a; }
.lg--taken { background: #7b8688; }
.lg--sel { background: var(--green); }
.lg--in { background: #fff; border: 2px solid #0c2a2c; }
.lg--m { background: #0050af; }
.lg--f { background: #a3399a; }
.lg--vip { background: repeating-linear-gradient(135deg, #efe6c8 0 4px, #e6dab5 4px 8px); }

.smap__loading { text-align: center; padding: 24px; color: rgba(12, 42, 44, .6); }
.smap__error { text-align: center; padding: 18px; color: #8a1c1c; background: #fdecec; border-radius: 10px; }

/* ---------------------------------------------------- شبكة المقاعد */
.smap__seats { margin-top: 6px; }
.smap__seatsHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.smap__zoneTitle { font-weight: 800; color: #00343a; font-size: 1.05rem; }
.smap__zoneTitle small { display: block; font-weight: 500; font-size: .8rem; color: rgba(12, 42, 44, .6); }
.smap__stageMini { text-align: center; font-size: .78rem; color: rgba(12, 42, 44, .55); margin-bottom: 8px; }
.smap__grid { overflow-x: auto; overflow-y: hidden; padding: 6px 2px 10px; -webkit-overflow-scrolling: touch; direction: ltr; }
.smap__grid table { border-collapse: separate; border-spacing: 4px; margin: 0 auto; }
.smap__grid th { font-size: .72rem; color: rgba(12, 42, 44, .55); font-weight: 700; min-width: 22px; text-align: center; position: sticky; left: 0; background: #f4f9f6; }
.seat {
  width: 34px; height: 34px; border-radius: 8px 8px 4px 4px; border: 1px solid rgba(0, 52, 58, .18); background: #e8f5ee; color: #0c2a2c;
  font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; padding: 0; transition: transform .1s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.seat:hover { transform: scale(1.08); background: #cfeadb; }
.seat.is-taken { background: #c9cfd0; color: #6b7475; cursor: not-allowed; border-color: transparent; }
.seat.is-taken:hover { transform: none; }
.seat.is-m { background: #0050af; color: #fff; border-color: transparent; }
.seat.is-f { background: #a3399a; color: #fff; border-color: transparent; }
.seat.is-in { box-shadow: inset 0 0 0 2px #0c2a2c; }
.seat.is-x { background: #3d4446; color: #fff; border-color: transparent; cursor: pointer; }
.seat.is-x::after { content: "✕"; font-size: .7rem; }
.seat.is-x { font-size: 0; }
.lg--x { background: #3d4446; }
.smap__info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.smap__info .btn { padding: 6px 12px; font-size: .82rem; }
.seat.is-sel { background: var(--green); color: #fff; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 137, 74, .25); }
.seat:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.smap--admin .seat.is-taken { cursor: pointer; }
.smap__info { margin-top: 10px; padding: 10px 14px; background: #f4f9f6; border-radius: 10px; color: #0c2a2c; }

.smap__pick { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(0, 137, 74, .1); color: #00343a; border: 1px solid rgba(0, 137, 74, .3); }
.smap__pick i { color: var(--green); font-size: 1.3rem; }

/* ---------------------------------------------------- الأزرار فوق الأبيض */
.sec:not(.sec--tint) .btn--fill { color: #fff; }
.sec:not(.sec--tint) .btn--fill::before { background: var(--green); }
.sec:not(.sec--tint) .btn--fill:hover::before { background: var(--green-hi); }
.sec:not(.sec--tint) .btn--fill:hover { color: #fff; }

/* ---------------------------------------------------- التذكرة */
.ticket-sec { padding-block: 130px 50px; }
.ticket {
  max-width: 520px; margin: 0 auto; background: #fff; border-radius: 22px; overflow: hidden; color: #0c2a2c;
  box-shadow: 0 20px 50px rgba(0, 38, 40, .18); border: 1px solid rgba(0, 52, 58, .1);
}
.ticket__head { background: linear-gradient(160deg, #00343a, #002628); color: #fff; padding: 20px 22px 22px; text-align: center; }
.ticket__brands { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ticket__emblem { width: 190px; max-width: 62%; height: auto; }
.ticket__kfu { width: 56px; height: 56px; border-radius: 50%; background: #fff; padding: 3px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.ticket__ok { font-size: 1.25rem; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ticket__ok i { color: var(--lime-hi); }
.flag-sa { width: 30px; height: 20px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); vertical-align: middle; }
.ticket__title { margin-top: 6px; color: var(--lime-hi); font-weight: 700; }
.ticket__name { margin-top: 10px; font-size: 1.05rem; color: rgba(255, 255, 255, .9); }
.ticket__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 20px 0; padding: 0; }
.ticket__facts > div { background: #f4f9f6; border-radius: 12px; padding: 10px 12px; }
.ticket__facts .full { grid-column: 1 / -1; }
.ticket__facts dt { font-size: .78rem; color: rgba(12, 42, 44, .6); margin: 0 0 3px; }
.ticket__facts dd { margin: 0; font-weight: 800; font-size: 1rem; color: #00343a; }
.ticket__facts dd.hi { font-size: 1.5rem; color: var(--green); }
.ticket__facts dd small { font-weight: 500; color: rgba(12, 42, 44, .7); }
.ticket__qr { text-align: center; padding: 22px 16px 8px; position: relative; margin-top: 16px; border-top: 2px dashed rgba(0, 52, 58, .18); }
.ticket__qr::before, .ticket__qr::after { content: ""; position: absolute; top: -14px; width: 28px; height: 28px; border-radius: 50%; background: var(--paper, #fff); border: 1px solid rgba(0, 52, 58, .1); }
.ticket__qr::before { inset-inline-start: -15px; } .ticket__qr::after { inset-inline-end: -15px; }
.ticket__qr img { display: block; margin: 0 auto; width: 240px; max-width: 80%; height: auto; border: 2px solid var(--green); border-radius: 14px; padding: 8px; background: #fff; }
.ticket__code { font-family: Consolas, "Courier New", monospace; font-size: 1.15rem; letter-spacing: 2px; font-weight: 700; margin-top: 10px; color: #00343a; }
.ticket__note { margin: 10px 0 0; text-align: center; font-weight: 800; color: #00343a; }
.ticket__note i { color: var(--green); }
.ticket__foot { margin-top: 12px; padding: 12px 20px; background: #f4f9f6; font-size: .82rem; color: rgba(12, 42, 44, .7); text-align: center; border-top: 1px solid rgba(0, 52, 58, .1); }
.ticket__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

@media print {
  .nav, .foot, .toTop, .prog, .ticket__actions { display: none !important; }
  .ticket { box-shadow: none; border: 1px solid #999; }
  .ticket-sec { padding: 0; }
}

@media (max-width: 480px) {
  .reg__panel { padding: 16px; }
  .ticket-sec { padding-top: 108px; }
  .seat { width: 32px; height: 32px; }
  .reg__actions { flex-direction: column; align-items: stretch; }
  .btn--lg { width: 100%; justify-content: center; }
  .ticket__facts { margin-inline: 14px; }
}
