/* Quick Pay — page layer on top of the Zain bundle */

.is-off {
  cursor: pointer;
}

[dir="rtl"] body {
  font-family: "Nunito Sans", "QtZainText", sans-serif;
}

/* ---------- tabs ---------- */
.tab {
  background: #fff;
  color: #111;
  border-color: transparent;
}
.tab.is-tab-active {
  border-color: hsl(var(--primary));
  font-weight: 700;
  color: hsl(var(--primary));
}
.tab:not(.is-tab-active):hover {
  color: #000;
}

/* ---------- combobox ---------- */
.combo-trigger[data-state="open"] > svg,
.amount-trigger[data-state="open"] > svg {
  transform: rotate(180deg);
}
.combo-list {
  position: absolute;
  z-index: 40;
  inset-inline: 0;
  top: calc(100% + 2px);
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
  max-height: 320px;
  overflow: auto;
}
.combo-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
}
.combo-option:hover {
  background: #f7f7f8;
}
.combo-option.is-selected {
  background: #fbd6e8;
  color: hsl(var(--primary));
}
.combo-option.is-selected::before {
  content: "\2713";
  position: absolute;
  inset-inline-start: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
}
.combo-option.is-selected {
  padding-inline-start: 28px;
}
.combo-option.is-selected::before {
  top: 50%;
  transform: translateY(-50%);
}

.amount-list .combo-option {
  padding: 0;
}
.amount-list .combo-option.is-selected {
  padding: 0;
}
.amount-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}
.amount-row b {
  font-weight: 600;
}
.amount-row span:last-child {
  color: #4b5563;
}
.combo-option.is-selected .amount-row,
.combo-option.is-selected .amount-row span:last-child {
  color: hsl(var(--primary));
}

.combo-option.is-selected .amount-row {
  padding-inline-start: 30px;
}

.amount-other {
  padding-top: 4px;
}

/* ---------- fields & messages ---------- */
.field .msg {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  min-height: 0;
  display: none;
}
.field .msg.is-error {
  display: block;
  color: #ff3d71;
}
.field .msg.is-valid {
  display: block;
  color: hsl(var(--green-dark));
}
.field .msg.is-valid::before {
  content: "\2713  ";
}
.field.is-invalid input {
  border-color: #ff3d71;
}
.is-required::after {
  content: "*";
  margin-inline-start: 5px;
  color: hsl(var(--primary));
}

/* ---------- buttons ---------- */
.cta {
  background: #e5e5e5;
  color: #a3a3a3;
  border: 0;
}
.cta:not(:disabled) {
  background: hsl(var(--primary));
  color: #fff;
  cursor: pointer;
}
.cta:not(:disabled):hover {
  background: hsl(var(--primary) / .9);
}

.add-line {
  border-color: #e5e5e5;
  background: #e5e5e5;
  color: #a3a3a3;
}
.add-line:not(:disabled) {
  border-color: hsl(var(--primary));
  background: #fff;
  color: hsl(var(--primary));
  cursor: pointer;
}
.add-line:not(:disabled):hover {
  background: hsl(var(--primary));
  color: #fff;
}

.remove-line {
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* ---------- pay bill amounts ---------- */
.bill-summary.is-shown {
  display: grid;
}
.bill-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  text-align: start;
  font-size: 14px;
  transition: background-color .15s, border-color .15s;
}
.bill-opt:hover {
  background: #f9fafb;
}
.bill-opt.is-selected {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / .05);
}
.bill-opt__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.bill-opt .radio {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid hsl(var(--primary));
  border-radius: 50%;
}
.bill-opt .radio .dot {
  display: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(var(--primary));
}
.bill-opt.is-selected .radio .dot {
  display: block;
}
.bill-opt__sum {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  color: #38c33f;
}
.bill-other__box {
  position: relative;
  width: 160px;
}
.bill-other__cur {
  position: absolute;
  inset-block: 4px;
  inset-inline-end: 4px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  background: #f3f4f6;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

/* ---------- checkout ---------- */
.pm.is-selected {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / .05);
}
.pm.is-selected .radio {
  border-color: hsl(var(--primary));
}
.pm.is-selected .dot {
  display: block;
}
.summary-toggle[aria-expanded="true"] .summary-chev {
  transform: rotate(225deg);
}
.summary-body.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

/* ---------- footer ---------- */
.foot-group .foot-link {
  display: none;
}
.foot-group.is-open .foot-link {
  display: block;
}
.foot-plus {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0 6px;
  margin-inline-end: 6px;
  font-size: 22px;
  line-height: 1;
  vertical-align: -2px;
}
.foot-plus.is-open span {
  display: inline-block;
  transform: rotate(45deg);
}

/* ---------- bottom sheet ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  background: rgba(15, 12, 30, .55);
}
.sheet-card {
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  animation: sheet-up .25s ease-out;
}
@keyframes sheet-up {
  from { transform: translateY(24px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}
.sheet-grip {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: #e2e2e6;
  margin: 0 auto 14px;
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.sheet-close {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
}

/* ---------- loading ---------- */
.loading {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  font-size: 14px;
  color: #4b5563;
}
.loader {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid #f0dbe7;
  border-top-color: hsl(var(--primary));
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  inset-inline: 16px;
  bottom: 84px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 12px;
  background: #1c153d;
  color: #fff;
  font-size: 14px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast.is-error {
  background: #c0243f;
}

/* ---------- tips ---------- */
.tip {
  position: fixed;
  z-index: 110;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #1c153d;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

/* ---------- mobile amount sheet ---------- */
.amt-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  background: rgba(17, 17, 17, .45);
}
.amt-sheet.hidden {
  display: none;
}
.amt-sheet__card {
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  background: #fff;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.amt-sheet__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #eee;
  background: #fff;
  padding: 16px;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}
.amt-sheet__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f2f2f2;
  background: #fff;
  padding: 18px 20px;
  text-align: start;
  font-size: 15px;
  color: #111827;
}
.amt-sheet__row.is-selected {
  background: #fbd6e8;
  color: hsl(var(--primary));
  font-weight: 700;
}
.amt-sheet__row span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.amt-sheet__row .tick {
  visibility: hidden;
}
.amt-sheet__row.is-selected .tick {
  visibility: visible;
}

/* ---------- mobile layout ---------- */
@media (max-width: 767px) {
  body {
    padding-bottom: 68px;
  }
  .footer .foot-link {
    text-align: start;
  }
  .footer .foot-group {
    text-align: start;
  }
  .footer .foot-plus {
    margin-inline-end: 4px;
  }
  #main-content > div {
    margin-top: 0;
    padding-top: 12px;
  }
  #main-content h1 {
    margin-bottom: 14px;
  }
  #payCard,
  #checkout > div {
    border-radius: 16px;
  }
  #payCard {
    box-shadow: 0 2px 10px rgba(17, 17, 17, .07);
  }
  .combo-list {
    position: static;
    margin-top: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  }
  .sheet .combo-list {
    position: static;
  }
  .toast {
    bottom: 78px;
  }
}

@media (min-width: 768px) {
  .footer .foot-link {
    display: block;
  }
}

/* ---------- RTL ---------- */
[dir="rtl"] .combo-value,
[dir="rtl"] .amount-row,
[dir="rtl"] .amount-trigger span[dir] {
  direction: rtl;
}
[dir="rtl"] .combo-option.is-selected::before {
  inset-inline-start: 10px;
}



.sheet.hidden,
.loading.hidden {
  display: none;
}
.toast.hidden {
  display: none;
}






[dir="rtl"] .nav-ent {
  display: none;
}
