#checkout-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 99100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

#checkout-modal.active {
  display: flex;
  overflow-y: auto;
}

.checkout-modal__panel {
  width: 100%;
  max-width: 440px;
  background: #141414;
  border: 1px solid rgba(255, 189, 89, 0.25);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow: visible;
  color: #f1f5f9;
}

.checkout-modal__close {
  float: right;
  background: none;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

html[lang="ar"] .checkout-modal__close {
  float: left;
}

#checkout-modal .login-en,
#checkout-modal .login-ar {
  color: inherit;
}

.checkout-modal__title {
  margin: 0 0 18px;
  font-size: 1.15rem;
  color: #fff;
  font-weight: 800;
}

.checkout-modal__product {
  background: rgba(255, 189, 89, 0.08);
  border: 1px solid rgba(255, 189, 89, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  color: #fff;
}

.checkout-modal__field {
  margin-bottom: 16px;
}

.checkout-modal__field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.checkout-modal__field label .req {
  color: #ffbd59;
}

.checkout-modal__field input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.checkout-modal__field input:focus {
  outline: none;
  border-color: #ffbd59;
  box-shadow: 0 0 0 3px rgba(255, 189, 89, 0.12);
}

.checkout-modal__hint {
  margin: 8px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.checkout-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.checkout-modal__btn {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, opacity 0.15s;
}

.checkout-modal__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.checkout-modal__btn--stripe {
  background: linear-gradient(135deg, #ffbd59, #e6a040);
  color: #111;
  padding: 12px 14px;
}

.checkout-modal__btn-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.checkout-modal__bubbles-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

html[lang="ar"] .checkout-modal__bubbles-stack {
  align-items: flex-start;
}

.checkout-modal__bubble {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.checkout-modal__bubble--popular {
  background: #1e293b;
  color: #fff;
}

.checkout-modal__bubble--fee {
  background: #059669;
  color: #fff;
}

.checkout-modal__btn-title {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  flex: 1;
  min-width: 0;
}

.checkout-modal__btn--local {
  background: #25d366;
  color: #fff;
}

.checkout-modal__btn:not(:disabled):hover {
  transform: translateY(-1px);
}

/* intl-tel-input v17 — phone field in checkout modal */
#checkout-modal .iti {
  width: 100%;
  display: block;
}

#checkout-modal .iti input[type="tel"] {
  width: 100% !important;
  padding: 12px 14px 12px 118px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  color: #fff !important;
  font-size: 0.95rem !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
  outline: none !important;
}

#checkout-modal .iti input[type="tel"]:focus {
  border-color: #ffbd59 !important;
  box-shadow: 0 0 0 3px rgba(255, 189, 89, 0.12) !important;
}

#checkout-modal .iti__flag-container {
  left: 0 !important;
  right: auto !important;
}

#checkout-modal .iti__selected-flag {
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 10px 0 0 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0 8px 0 10px;
  height: 100%;
}

#checkout-modal .iti__selected-flag:hover,
#checkout-modal .iti__selected-flag:focus {
  background: rgba(255, 189, 89, 0.12) !important;
}

#checkout-modal .iti__selected-dial-code {
  color: #e2e8f0 !important;
  font-size: 0.85rem;
  font-weight: 600;
}

#checkout-modal .iti__arrow {
  border-top-color: #cbd5e1 !important;
  margin-left: 4px;
}

#checkout-modal .iti__arrow.iti__arrow--up {
  border-bottom-color: #cbd5e1 !important;
  border-top-color: transparent !important;
}

/* Dropdown is appended to body (.iti--container) in v17 */
body.checkout-modal-open .iti--container {
  z-index: 99250 !important;
}

body.checkout-modal-open .iti__country-list {
  background: #1a1a1a !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55) !important;
  max-height: min(280px, 45vh) !important;
  overflow-y: auto !important;
  color: #e2e8f0 !important;
  min-width: 280px;
}

body.checkout-modal-open .iti__country {
  color: #e2e8f0 !important;
  padding: 8px 12px !important;
}

body.checkout-modal-open .iti__country-name {
  color: #e2e8f0 !important;
}

body.checkout-modal-open .iti__country:hover,
body.checkout-modal-open .iti__country.iti__highlight {
  background: rgba(255, 189, 89, 0.14) !important;
}

body.checkout-modal-open .iti__country:hover .iti__country-name,
body.checkout-modal-open .iti__country.iti__highlight .iti__country-name {
  color: #ffbd59 !important;
}

body.checkout-modal-open .iti__dial-code {
  color: #94a3b8 !important;
}

body.checkout-modal-open .iti__divider {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  margin-bottom: 4px;
  padding-bottom: 4px;
}
