/* =========================================================
   SENDTOP - MOBILE TOP UP
========================================================= */


/* =========================================================
   PAGE
========================================================= */

.topup-page-content {
  padding-bottom: 60px;
}


/* =========================================================
   TOPBAR SECURE PAYMENT
========================================================= */

.topup-secure-mini {
  min-height: 44px;

  padding: 7px 13px;

  border: 1px solid #e5eaf1;
  border-radius: 13px;

  display: flex;
  align-items: center;
  gap: 9px;

  background: #ffffff;
}


.topup-secure-mini-icon {
  width: 30px;
  height: 30px;

  flex-shrink: 0;

  border-radius: 9px;

  display: grid;
  place-items: center;

  background: #ecfdf3;

  font-size: 14px;
}


.topup-secure-mini > div {
  display: flex;
  flex-direction: column;

  line-height: 1.2;
}


.topup-secure-mini > div span {
  color: #94a3b8;

  font-size: 9px;
  font-weight: 600;
}


.topup-secure-mini > div strong {
  margin-top: 3px;

  color: #334155;

  font-size: 11px;
  font-weight: 700;
}


/* =========================================================
   PAGE HEADING
========================================================= */

.topup-page-heading {
  margin-bottom: 24px;
}


.panel-eyebrow {
  display: block;

  margin-bottom: 7px;

  color: var(--primary);

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 1px;
}


.topup-page-heading h1 {
  margin: 0;

  color: var(--text);

  font-size: clamp(28px, 3vw, 38px);

  line-height: 1.15;

  letter-spacing: -1px;
}


.topup-page-heading p {
  max-width: 650px;

  margin: 9px 0 0;

  color: var(--text-soft);

  font-size: 14px;

  line-height: 1.65;
}


/* =========================================================
   MAIN GRID
========================================================= */

.topup-main-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(320px, 390px);

  gap: 22px;

  align-items: start;
}


.topup-form-column {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 18px;
}


.topup-summary-column {
  min-width: 0;

  position: sticky;

  top: 96px;
}


/* =========================================================
   TOP UP CARD
========================================================= */

.topup-card {
  padding: 24px;

  border: 1px solid var(--border);

  border-radius: 22px;

  background: #ffffff;

  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.04);
}


/* =========================================================
   CARD HEADER
========================================================= */

.topup-card-header {
  margin-bottom: 22px;

  display: flex;

  align-items: flex-start;

  gap: 13px;
}


.topup-card-header.compact-header {
  margin-bottom: 17px;
}


.topup-step-number {
  width: 36px;
  height: 36px;

  flex-shrink: 0;

  border-radius: 11px;

  display: grid;
  place-items: center;

  color: #ffffff;

  background: var(--primary);

  box-shadow:
    0 6px 15px rgba(22, 119, 255, 0.18);

  font-size: 13px;
  font-weight: 800;
}


.topup-card-header h2 {
  margin: 0;

  color: var(--text);

  font-size: 18px;

  line-height: 1.3;
}


.topup-card-header p {
  margin: 4px 0 0;

  color: var(--muted);

  font-size: 11px;

  line-height: 1.5;
}


.topup-icon-box {
  width: 36px;
  height: 36px;

  flex-shrink: 0;

  border-radius: 11px;

  display: grid;
  place-items: center;

  background: #eef5ff;

  font-size: 17px;
}


/* =========================================================
   FORM GRID
========================================================= */

.topup-form-grid {
  display: grid;

  grid-template-columns:
    minmax(190px, 0.75fr)
    minmax(0, 1.25fr);

  gap: 14px;
}


/* =========================================================
   FIELD
========================================================= */

.topup-field {
  min-width: 0;
}


.topup-field label,
.custom-amount-box > label {
  display: block;

  margin-bottom: 7px;

  color: #334155;

  font-size: 11px;
  font-weight: 700;
}


/* =========================================================
   COUNTRY SELECT
========================================================= */

.topup-select-button {
  width: 100%;
  height: 54px;

  padding: 0 13px;

  border: 1px solid #dfe6ef;

  border-radius: 13px;

  display: flex;

  align-items: center;

  gap: 10px;

  background: #ffffff;

  font-family: inherit;

  text-align: left;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}


.topup-select-button:hover {
  border-color: #b8d5ff;

  background: #fbfdff;
}


.topup-select-button:focus {
  outline: none;

  border-color: var(--primary);

  box-shadow:
    0 0 0 3px rgba(22, 119, 255, 0.09);
}


.topup-selected-flag {
  width: 30px;

  flex-shrink: 0;

  text-align: center;

  font-size: 22px;
}


.topup-select-content {
  flex: 1;

  min-width: 0;

  display: flex;

  flex-direction: column;
}


.topup-select-content strong {
  overflow: hidden;

  color: var(--text);

  font-size: 12px;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.topup-select-content span {
  margin-top: 2px;

  overflow: hidden;

  color: var(--muted);

  font-size: 9px;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.topup-chevron {
  flex-shrink: 0;

  color: #94a3b8;

  font-size: 14px;
}


/* =========================================================
   PHONE
========================================================= */

.topup-phone-input {
  height: 54px;

  overflow: hidden;

  border: 1px solid #dfe6ef;

  border-radius: 13px;

  display: flex;

  align-items: center;

  background: #ffffff;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}


.topup-phone-input:focus-within {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px rgba(22, 119, 255, 0.09);
}


.topup-country-code {
  height: 100%;

  padding: 0 13px;

  flex-shrink: 0;

  border-right: 1px solid #edf1f5;

  display: flex;

  align-items: center;

  color: #475569;

  background: #f8fafc;

  font-size: 12px;

  font-weight: 700;
}


.topup-phone-input input {
  width: 100%;
  height: 100%;

  min-width: 0;

  padding: 0 14px;

  border: 0;
  outline: 0;

  color: var(--text);

  background: transparent;

  font-family: inherit;

  font-size: 13px;
}


.topup-phone-input input::placeholder {
  color: #b0bac8;
}


/* =========================================================
   ERROR
========================================================= */

.topup-field-error {
  display: block;

  min-height: 14px;

  margin-top: 5px;

  color: var(--danger);

  font-size: 9px;

  line-height: 1.4;
}


/* =========================================================
   MAIN ACTION
========================================================= */

.topup-action-button {
  min-height: 45px;

  margin-top: 17px;

  padding: 0 18px;

  border: 0;

  border-radius: 12px;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  color: #ffffff;

  background: var(--primary);

  font-family: inherit;

  font-size: 11px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}


.topup-action-button:hover {
  background: var(--primary-dark);

  transform: translateY(-1px);
}


/* =========================================================
   OPERATOR
========================================================= */

.detected-operator-card {
  min-height: 78px;

  padding: 13px;

  border: 1px solid #dce9fa;

  border-radius: 16px;

  display: flex;

  align-items: center;

  gap: 13px;

  background: #f8fbff;
}


.detected-operator-logo {
  width: 48px;
  height: 48px;

  flex-shrink: 0;

  overflow: hidden;

  border: 1px solid #e7edf5;

  border-radius: 13px;

  display: grid;

  place-items: center;

  background: #ffffff;

  color: var(--primary);

  font-size: 10px;

  font-weight: 800;
}


.detected-operator-logo img {
  width: 100%;
  height: 100%;

  padding: 6px;

  object-fit: contain;
}


.detected-operator-info {
  flex: 1;

  min-width: 0;

  display: flex;

  flex-direction: column;
}


.detected-operator-info strong {
  overflow: hidden;

  color: var(--text);

  font-size: 13px;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.detected-operator-info span {
  margin-top: 4px;

  color: var(--muted);

  font-size: 10px;
}


.operator-verified {
  width: 28px;
  height: 28px;

  flex-shrink: 0;

  border-radius: 50%;

  display: grid;
  place-items: center;

  color: #16a34a;

  background: #dcfce7;

  font-size: 11px;
  font-weight: 800;
}


/* =========================================================
   MANUAL OPERATOR
========================================================= */

.manual-operator-notice {
  margin-bottom: 15px;

  padding: 12px 13px;

  border: 1px solid #dce9fa;

  border-radius: 13px;

  display: flex;

  align-items: flex-start;

  gap: 9px;

  background: #f8fbff;
}


.manual-operator-notice > span {
  flex-shrink: 0;
}


.manual-operator-notice p {
  margin: 0;

  color: #64748b;

  font-size: 10px;

  line-height: 1.55;
}


.manual-operator-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 10px;
}


.manual-operator-card {
  min-height: 92px;

  padding: 12px;

  border: 1px solid #e3e8ef;

  border-radius: 14px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 7px;

  background: #ffffff;

  color: var(--text);

  font-family: inherit;

  cursor: pointer;

  text-align: center;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}


.manual-operator-card:hover {
  border-color: #b7d5ff;

  background: #f8fbff;

  transform: translateY(-2px);
}


.manual-operator-card.active,
.manual-operator-card.selected {
  border-color: var(--primary);

  background: #eef5ff;
}


.manual-operator-card img {
  width: 34px;
  height: 34px;

  object-fit: contain;
}


.manual-operator-card strong {
  font-size: 10px;
}


/* =========================================================
   TABS
========================================================= */

.topup-tabs {
  margin-bottom: 17px;

  padding: 4px;

  border-radius: 12px;

  display: inline-flex;

  gap: 4px;

  background: #f1f5f9;
}


.topup-tab {
  min-width: 90px;
  height: 36px;

  padding: 0 14px;

  border: 0;

  border-radius: 9px;

  color: #64748b;

  background: transparent;

  font-family: inherit;

  font-size: 10px;
  font-weight: 700;

  cursor: pointer;
}


.topup-tab.active {
  color: var(--primary);

  background: #ffffff;

  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.06);
}

/* =========================================================
   PRODUCT TABS
========================================================= */

.topup-product-tabs {
  margin-bottom: 18px;

  padding: 4px;

  border-radius: 12px;

  display: inline-flex;
  flex-wrap: wrap;

  gap: 4px;

  background: #f1f5f9;
}


.topup-product-tab {
  min-width: 100px;
  height: 38px;

  padding: 0 14px;

  border: 0;
  border-radius: 9px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 6px;

  color: #64748b;

  background: transparent;

  font-family: inherit;
  font-size: 10px;
  font-weight: 700;

  cursor: pointer;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}


.topup-product-tab.active {
  color: var(--primary);

  background: #ffffff;

  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.06);
}


.topup-product-tab[hidden] {
  display: none !important;
}


/* =========================================================
   PRODUCT AMOUNT AREA
========================================================= */

#fixedAmountsGrid:not([hidden]) {
  display: grid;
}


#rangeAmountBox:not([hidden]) {
  display: block;

  min-height: 82px;
}


.custom-amount-box {
  width: 100%;
  max-width: 440px;
}


/* =========================================================
   FIXED AMOUNTS
========================================================= */

.amount-options-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 10px;
}


.amount-option {
  min-height: 64px;

  padding: 9px;

  border: 1px solid #e1e7ef;

  border-radius: 13px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  background: #ffffff;

  color: var(--text);

  font-family: inherit;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}


.amount-option:hover {
  border-color: #b8d5ff;

  background: #f8fbff;

  transform: translateY(-2px);
}


.amount-option.active,
.amount-option.selected {
  border-color: var(--primary);

  background: #eef5ff;

  color: var(--primary);
}


.amount-option strong {
  font-size: 14px;
}


.amount-option span {
  margin-top: 3px;

  color: #94a3b8;

  font-size: 8px;
}


/* =========================================================
   CUSTOM AMOUNT
========================================================= */

.custom-amount-box {
  max-width: 440px;
}


.custom-amount-input {
  height: 54px;

  overflow: hidden;

  border: 1px solid #dfe6ef;

  border-radius: 13px;

  display: flex;

  align-items: center;

  background: #ffffff;
}


.custom-amount-input:focus-within {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px rgba(22, 119, 255, 0.09);
}


.custom-amount-input span {
  height: 100%;

  padding: 0 14px;

  border-right: 1px solid #edf1f5;

  display: flex;

  align-items: center;

  color: #64748b;

  background: #f8fafc;

  font-size: 10px;

  font-weight: 800;
}


.custom-amount-input input {
  width: 100%;
  height: 100%;

  min-width: 0;

  padding: 0 14px;

  border: 0;
  outline: 0;

  color: var(--text);

  background: transparent;

  font-family: inherit;

  font-size: 14px;
}


.amount-range-info {
  margin-top: 7px;

  display: flex;

  justify-content: space-between;

  gap: 10px;

  color: #94a3b8;

  font-size: 9px;
}


.amount-range-info strong {
  color: #64748b;
}


/* =========================================================
   PLANS
========================================================= */

.plans-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 11px;
}


.plan-card {
  min-height: 120px;

  padding: 14px;

  border: 1px solid #e1e7ef;

  border-radius: 15px;

  background: #ffffff;

  color: inherit;

  font-family: inherit;

  cursor: pointer;

  text-align: left;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}


.plan-card:hover {
  border-color: #b8d5ff;

  transform: translateY(-2px);
}


.plan-card.active,
.plan-card.selected {
  border-color: var(--primary);

  background: #f4f8ff;
}


.plan-card strong {
  display: block;

  color: var(--text);

  font-size: 12px;

  line-height: 1.45;
}


.plan-card span {
  display: block;

  margin-top: 5px;

  color: #64748b;

  font-size: 9px;

  line-height: 1.5;
}


/* =========================================================
   PROMO
========================================================= */

.promo-input-row {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr) auto;

  gap: 9px;
}


.promo-input-row input {
  width: 100%;
  height: 46px;

  padding: 0 13px;

  border: 1px solid #dfe6ef;

  border-radius: 12px;

  outline: 0;

  color: var(--text);

  background: #ffffff;

  font-family: inherit;

  font-size: 11px;
}


.promo-input-row input:focus {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px rgba(22, 119, 255, 0.08);
}


.promo-apply-button {
  min-width: 84px;

  height: 46px;

  padding: 0 15px;

  border: 0;

  border-radius: 12px;

  color: #ffffff;

  background: var(--primary);

  font-family: inherit;

  font-size: 10px;

  font-weight: 700;

  cursor: pointer;
}


.promo-applied-box {
  min-height: 55px;

  padding: 10px 12px;

  border: 1px solid #bbf7d0;

  border-radius: 13px;

  align-items: center;

  justify-content: space-between;

  gap: 12px;

  background: #f0fdf4;
}


.promo-applied-box:not([hidden]) {
  display: flex;
}


.promo-applied-box > div {
  display: flex;

  align-items: center;

  gap: 9px;
}


.promo-success-icon {
  width: 27px;
  height: 27px;

  flex-shrink: 0;

  border-radius: 50%;

  display: grid;
  place-items: center;

  color: #ffffff;

  background: #22c55e;

  font-size: 10px;

  font-weight: 800;
}


.promo-applied-box strong {
  display: block;

  color: #166534;

  font-size: 11px;
}


.promo-applied-box > div > div span {
  display: block;

  margin-top: 2px;

  color: #4d7c5d;

  font-size: 9px;
}


.promo-applied-box button {
  border: 0;

  color: #dc2626;

  background: transparent;

  font-family: inherit;

  font-size: 9px;

  font-weight: 700;

  cursor: pointer;
}


/* =========================================================
   SUMMARY
========================================================= */

.topup-summary-card {
  overflow: hidden;

  border: 1px solid var(--border);

  border-radius: 22px;

  background: #ffffff;

  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.06);
}


.summary-header {
  padding: 20px 20px 17px;

  border-bottom: 1px solid #edf1f5;
}


.summary-header h2 {
  margin: 2px 0 0;

  color: var(--text);

  font-size: 18px;
}


/* =========================================================
   SUMMARY EMPTY
========================================================= */

.summary-empty {
  min-height: 330px;

  padding: 35px 25px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  text-align: center;
}


.summary-empty > div {
  width: 58px;
  height: 58px;

  margin-bottom: 12px;

  border-radius: 18px;

  display: grid;
  place-items: center;

  background: #eef5ff;

  font-size: 25px;
}


.summary-empty strong {
  color: var(--text);

  font-size: 13px;
}


.summary-empty span {
  max-width: 240px;

  margin-top: 5px;

  color: var(--muted);

  font-size: 10px;

  line-height: 1.55;
}


/* =========================================================
   SUMMARY CONTENT
========================================================= */

.summary-content {
  padding: 18px;
}


.summary-operator {
  padding: 12px;

  border-radius: 14px;

  display: flex;

  align-items: center;

  gap: 11px;

  background: #f8fafc;
}


.summary-operator-logo {
  width: 42px;
  height: 42px;

  flex-shrink: 0;

  overflow: hidden;

  border: 1px solid #e7edf5;

  border-radius: 11px;

  display: grid;

  place-items: center;

  background: #ffffff;

  color: var(--primary);

  font-size: 9px;

  font-weight: 800;
}


.summary-operator-logo img {
  width: 100%;
  height: 100%;

  padding: 5px;

  object-fit: contain;
}


.summary-operator > div:last-child {
  min-width: 0;
}


.summary-operator strong {
  display: block;

  overflow: hidden;

  color: var(--text);

  font-size: 11px;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.summary-operator span {
  display: block;

  margin-top: 3px;

  overflow: hidden;

  color: var(--muted);

  font-size: 9px;

  text-overflow: ellipsis;

  white-space: nowrap;
}


/* =========================================================
   SUMMARY DETAILS
========================================================= */

.summary-details {
  padding: 17px 2px 5px;
}


.summary-row {
  min-height: 29px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 15px;
}


.summary-row span {
  color: #64748b;

  font-size: 10px;
}


.summary-row strong {
  max-width: 190px;

  color: var(--text);

  font-size: 11px;

  text-align: right;
}


.summary-divider {
  height: 1px;

  margin: 9px 0;

  background: #edf1f5;
}


.summary-discount-row strong {
  color: #16a34a;
}


.summary-total-row {
  min-height: 38px;
}


.summary-total-row span {
  color: var(--text);

  font-size: 12px;

  font-weight: 700;
}


.summary-total-row strong {
  color: var(--primary);

  font-size: 19px;

  font-weight: 800;
}


/* =========================================================
   PAYMENT METHOD
========================================================= */

.payment-method-section {
  margin-top: 13px;

  padding-top: 16px;

  border-top: 1px solid #edf1f5;
}


.payment-method-label {
  display: block;

  margin-bottom: 9px;

  color: #475569;

  font-size: 9px;

  font-weight: 800;

  letter-spacing: 0.5px;

  text-transform: uppercase;
}


.payment-method-card {
  position: relative;

  min-height: 66px;

  padding: 11px;

  border: 1px solid #c7dcfb;

  border-radius: 14px;

  display: flex;

  align-items: center;

  gap: 10px;

  background:
    linear-gradient(
      135deg,
      #f7fbff,
      #eef6ff
    );

  cursor: default;
}


.payment-method-card input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}


.payment-method-icon {
  width: 40px;
  height: 40px;

  flex-shrink: 0;

  border-radius: 11px;

  display: grid;
  place-items: center;

  color: var(--primary);

  background: #ffffff;

  box-shadow:
    0 3px 10px rgba(15, 23, 42, 0.05);

  font-size: 18px;
}


.payment-method-card > div:nth-of-type(2) {
  flex: 1;

  min-width: 0;
}


.payment-method-card strong {
  display: block;

  color: var(--text);

  font-size: 11px;
}


.payment-method-card > div:nth-of-type(2) span {
  display: block;

  margin-top: 3px;

  color: #64748b;

  font-size: 9px;
}


.payment-method-check {
  width: 23px;
  height: 23px;

  flex-shrink: 0;

  border-radius: 50%;

  display: grid;
  place-items: center;

  color: #ffffff;

  background: var(--primary);

  font-size: 9px;

  font-weight: 800;
}


/* =========================================================
   CARD INFO
========================================================= */

.card-payment-info {
  margin-top: 10px;

  padding: 10px 11px;

  border-radius: 12px;

  background: #f8fafc;
}


.card-payment-brands {
  display: flex;

  align-items: center;

  gap: 6px;
}


.card-payment-brands span {
  min-height: 23px;

  padding: 0 8px;

  border: 1px solid #e2e8f0;

  border-radius: 6px;

  display: inline-flex;

  align-items: center;

  background: #ffffff;

  color: #334155;

  font-size: 8px;

  font-weight: 800;
}


.card-payment-info p {
  margin: 7px 0 0;

  color: #94a3b8;

  font-size: 8px;

  line-height: 1.5;
}


/* =========================================================
   PAY BUTTON
========================================================= */

.summary-pay-button {
  width: 100%;

  min-height: 47px;

  margin-top: 15px;

  padding: 0 15px;

  border: 0;

  border-radius: 13px;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  color: #ffffff;

  background: var(--primary);

  font-family: inherit;

  font-size: 11px;

  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}


.summary-pay-button:not(:disabled):hover {
  background: var(--primary-dark);

  transform: translateY(-1px);
}


.summary-pay-button:disabled {
  opacity: 0.48;

  cursor: not-allowed;
}


.summary-security-note {
  margin-top: 10px;

  color: #94a3b8;

  font-size: 8px;

  text-align: center;
}


/* =========================================================
   BUTTON LOADER
========================================================= */

.button-loader {
  width: 15px;
  height: 15px;

  border: 2px solid rgba(255, 255, 255, 0.4);

  border-top-color: #ffffff;

  border-radius: 50%;

  animation:
    topupSpin 0.7s linear infinite;
}


@keyframes topupSpin {

  to {
    transform: rotate(360deg);
  }

}


/* =========================================================
   MODAL
========================================================= */

.topup-modal {
  position: fixed;

  inset: 0;

  z-index: 2000;

  padding: 22px;

  display: flex;

  align-items: center;

  justify-content: center;
}


.topup-modal[hidden] {
  display: none !important;
}


.topup-modal-backdrop {
  position: absolute;

  inset: 0;

  background:
    rgba(15, 23, 42, 0.46);

  backdrop-filter: blur(3px);

  -webkit-backdrop-filter: blur(3px);
}


.topup-modal-card {
  position: relative;

  z-index: 2;

  width: min(520px, 100%);

  max-height: calc(100vh - 44px);

  overflow-y: auto;

  padding: 22px;

  border: 1px solid #e5eaf1;

  border-radius: 22px;

  background: #ffffff;

  box-shadow:
    0 30px 70px rgba(15, 23, 42, 0.2);
}


.topup-modal-header {
  margin-bottom: 17px;

  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 15px;
}


.topup-modal-header h2 {
  margin: 2px 0 0;

  color: var(--text);

  font-size: 20px;
}


.topup-modal-close {
  width: 36px;
  height: 36px;

  flex-shrink: 0;

  padding: 0;

  border: 0;

  border-radius: 10px;

  display: grid;

  place-items: center;

  color: #64748b;

  background: #f1f5f9;

  font-family: inherit;

  font-size: 20px;

  cursor: pointer;
}


/* =========================================================
   COUNTRY SEARCH
========================================================= */

.country-search-box {
  height: 48px;

  margin-bottom: 12px;

  padding: 0 12px;

  border: 1px solid #dfe6ef;

  border-radius: 12px;

  display: flex;

  align-items: center;

  gap: 8px;
}


.country-search-box input {
  width: 100%;
  height: 100%;

  border: 0;
  outline: 0;

  background: transparent;

  color: var(--text);

  font-family: inherit;

  font-size: 11px;
}


.country-list {
  max-height: 410px;

  overflow-y: auto;

  display: flex;

  flex-direction: column;

  gap: 5px;
}


.country-item {
  width: 100%;

  min-height: 52px;

  padding: 8px 10px;

  border: 0;

  border-radius: 11px;

  display: flex;

  align-items: center;

  gap: 10px;

  background: transparent;

  color: var(--text);

  font-family: inherit;

  text-align: left;

  cursor: pointer;
}


.country-item:hover {
  background: #f5f8ff;
}


.country-item-flag {
  width: 30px;

  flex-shrink: 0;

  text-align: center;

  font-size: 21px;
}


.country-item-info {
  flex: 1;

  display: flex;

  flex-direction: column;
}


.country-item-info strong {
  font-size: 11px;
}


.country-item-info span {
  margin-top: 2px;

  color: var(--muted);

  font-size: 9px;
}


/* =========================================================
   REVIEW MODAL
========================================================= */

.review-modal-card {
  width: min(500px, 100%);
}


.review-modal-operator {
  padding: 12px;

  border-radius: 14px;

  display: flex;

  align-items: center;

  gap: 11px;

  background: #f8fafc;
}


.review-modal-logo {
  width: 44px;
  height: 44px;

  flex-shrink: 0;

  overflow: hidden;

  border: 1px solid #e7edf5;

  border-radius: 12px;

  display: grid;

  place-items: center;

  background: #ffffff;

  color: var(--primary);

  font-size: 9px;

  font-weight: 800;
}


.review-modal-logo img {
  width: 100%;
  height: 100%;

  padding: 5px;

  object-fit: contain;
}


.review-modal-operator strong {
  display: block;

  color: var(--text);

  font-size: 12px;
}


.review-modal-operator > div:last-child span {
  display: block;

  margin-top: 3px;

  color: var(--muted);

  font-size: 9px;
}


/* =========================================================
   REVIEW DETAILS
========================================================= */

.review-modal-details {
  margin-top: 14px;

  padding: 4px 2px;
}


.review-modal-details > div {
  min-height: 34px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 15px;
}


.review-modal-details span {
  color: #64748b;

  font-size: 10px;
}


.review-modal-details strong {
  max-width: 240px;

  color: var(--text);

  font-size: 11px;

  text-align: right;
}


.review-modal-details .review-discount {
  color: #16a34a;
}


.review-modal-details .review-total {
  min-height: 48px;

  margin-top: 7px;

  padding-top: 9px;

  border-top: 1px solid #e8edf3;
}


.review-modal-details .review-total span {
  color: var(--text);

  font-size: 12px;

  font-weight: 700;
}


.review-modal-details .review-total strong {
  color: var(--primary);

  font-size: 20px;
}


/* =========================================================
   REVIEW PAYMENT
========================================================= */

.review-payment-method {
  min-height: 64px;

  margin-top: 12px;

  padding: 10px 11px;

  border: 1px solid #d6e6fc;

  border-radius: 14px;

  display: flex;

  align-items: center;

  gap: 10px;

  background: #f7fbff;
}


.review-payment-icon {
  width: 39px;
  height: 39px;

  flex-shrink: 0;

  border-radius: 11px;

  display: grid;
  place-items: center;

  background: #ffffff;

  font-size: 18px;
}


.review-payment-method > div:nth-child(2) {
  flex: 1;
}


.review-payment-method > div:nth-child(2) span {
  display: block;

  color: #94a3b8;

  font-size: 8px;

  font-weight: 800;

  letter-spacing: 0.5px;
}


.review-payment-method > div:nth-child(2) strong {
  display: block;

  margin-top: 3px;

  color: var(--text);

  font-size: 10px;
}


.review-payment-secure {
  flex-shrink: 0;

  color: #16a34a;

  font-size: 9px;

  font-weight: 700;
}


/* =========================================================
   REVIEW NOTICE
========================================================= */

.review-notice {
  margin-top: 13px;

  padding: 11px;

  border-radius: 12px;

  display: flex;

  align-items: flex-start;

  gap: 8px;

  background: #fffaf0;
}


.review-notice > span {
  flex-shrink: 0;
}


.review-notice p {
  margin: 0;

  color: #7c6745;

  font-size: 9px;

  line-height: 1.55;
}


/* =========================================================
   REVIEW BUTTON
========================================================= */

.review-confirm-button {
  width: 100%;

  min-height: 48px;

  margin-top: 15px;

  border: 0;

  border-radius: 13px;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  color: #ffffff;

  background: var(--primary);

  font-family: inherit;

  font-size: 11px;

  font-weight: 700;

  cursor: pointer;
}


.review-confirm-button:hover {
  background: var(--primary-dark);
}


.review-card-security {
  margin-top: 9px;

  color: #94a3b8;

  font-size: 8px;

  line-height: 1.5;

  text-align: center;
}


/* =========================================================
   HIDDEN
========================================================= */

[hidden] {
  display: none !important;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

  .topup-main-grid {
    grid-template-columns:
      minmax(0, 1fr)
      330px;
  }


  .amount-options-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

}


/* =========================================================
   SMALL TABLET
========================================================= */

@media (max-width: 900px) {

  .topup-main-grid {
    grid-template-columns: 1fr;
  }


  .topup-summary-column {
    position: static;
  }


  .topup-summary-card {
    max-width: none;
  }


  .summary-empty {
    min-height: 220px;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

  .topup-secure-mini {
    display: none;
  }


  .topup-page-content {
    padding-bottom: 35px;
  }


  .topup-page-heading {
    margin-bottom: 18px;
  }


  .topup-page-heading h1 {
    font-size: 26px;
  }


  .topup-page-heading p {
    font-size: 12px;
  }


  .topup-form-column {
    gap: 13px;
  }


  .topup-main-grid {
    gap: 13px;
  }


  .topup-card {
    padding: 18px;

    border-radius: 18px;
  }


  .topup-form-grid {
    grid-template-columns: 1fr;
  }


  .manual-operator-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }


  .amount-options-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }


  .plans-grid {
    grid-template-columns: 1fr;
  }


  .topup-action-button {
    width: 100%;
  }


  .topup-summary-card {
    border-radius: 18px;
  }


  .topup-modal {
    padding: 13px;
  }


  .topup-modal-card {
    max-height:
      calc(100dvh - 26px);

    padding: 18px;

    border-radius: 18px;
  }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

  .topup-page-heading h1 {
    font-size: 24px;
  }


  .topup-card {
    padding: 16px;
  }


  .topup-card-header {
    margin-bottom: 18px;
  }


  .topup-step-number {
    width: 33px;
    height: 33px;
  }


  .topup-card-header h2 {
    font-size: 16px;
  }


  .topup-select-button,
  .topup-phone-input,
  .custom-amount-input {
    height: 52px;
  }


  .amount-options-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }


  .promo-input-row {
    grid-template-columns: 1fr;
  }


  .promo-apply-button {
    width: 100%;
  }


  .summary-content {
    padding: 15px;
  }


  .summary-header {
    padding: 17px 15px 14px;
  }


  .review-payment-secure {
    display: none;
  }


  .topup-modal {
    align-items: flex-end;

    padding: 0;
  }


  .topup-modal-card {
    width: 100%;

    max-height: 92dvh;

    border-radius:
      22px 22px 0 0;

    border-bottom: 0;
  }

}

/* =========================================================
   COUNTRY MODAL - SENDTOP
========================================================= */

#countryModal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;
}


#countryModal[hidden] {
  display: none !important;
}


/* BACKDROP */

#countryModal .topup-modal-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(15, 23, 42, 0.48);

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}


/* MODAL CARD */

#countryModal .topup-modal-card {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 520px;

  max-height: min(720px, calc(100vh - 48px));

  display: flex;
  flex-direction: column;

  background: #ffffff;

  border: 1px solid #e5e7eb;
  border-radius: 24px;

  overflow: hidden;

  box-shadow:
    0 30px 80px rgba(15, 23, 42, 0.22);

  animation: countryModalOpen 0.22s ease;
}


/* =========================================================
   HEADER
========================================================= */

#countryModal .topup-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;

  padding: 26px 26px 20px;

  border-bottom: 1px solid #eef1f4;
}


#countryModal .panel-eyebrow {
  display: block;

  margin-bottom: 8px;

  color: #087c4c;

  font-size: 11px;
  font-weight: 800;

  letter-spacing: 1.4px;
}


#countryModal .topup-modal-header h2 {
  margin: 0;

  color: #111827;

  font-size: 24px;
  font-weight: 800;

  letter-spacing: -0.5px;
}


/* CLOSE */

#countryModal .topup-modal-close {
  width: 40px;
  height: 40px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid #e5e7eb;
  border-radius: 12px;

  background: #f8fafc;

  color: #64748b;

  cursor: pointer;

  font-size: 22px;
  line-height: 1;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}


#countryModal .topup-modal-close:hover {
  background: #eefbf5;
  color: #087c4c;

  transform: rotate(4deg);
}


/* =========================================================
   SEARCH
========================================================= */

#countryModal .country-search-box {
  position: relative;

  display: flex;
  align-items: center;

  margin: 18px 22px 10px;

  min-height: 52px;

  border: 1px solid #dce3e8;
  border-radius: 14px;

  background: #ffffff;

  overflow: hidden;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}


#countryModal .country-search-box:focus-within {
  border-color: #0fa968;

  box-shadow:
    0 0 0 4px rgba(15, 169, 104, 0.10);
}


#countryModal .country-search-box > span {
  width: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  font-size: 17px;
}


#countryModal #countrySearchInput {
  width: 100%;
  height: 50px;

  padding: 0 15px 0 0;

  border: 0;
  outline: 0;

  background: transparent;

  color: #111827;

  font-size: 14px;
  font-family: inherit;
}


#countryModal #countrySearchInput::placeholder {
  color: #9ca3af;
}


/* =========================================================
   COUNTRY LIST
========================================================= */

#countryModal .country-list {
  flex: 1;

  min-height: 0;

  padding: 8px 14px 18px;

  overflow-y: auto;

  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}


#countryModal .country-list::-webkit-scrollbar {
  width: 7px;
}


#countryModal .country-list::-webkit-scrollbar-track {
  background: transparent;
}


#countryModal .country-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;

  border-radius: 999px;
}


/* =========================================================
   COUNTRY ROW
========================================================= */

#countryModal .country-option {
  width: 100%;

  min-height: 66px;

  display: flex;
  align-items: center;

  gap: 14px;

  padding: 10px 12px;

  margin-bottom: 4px;

  border: 1px solid transparent;
  border-radius: 14px;

  background: transparent;

  cursor: pointer;

  text-align: left;

  font-family: inherit;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}


#countryModal .country-option:hover {
  background: #f2fbf6;

  border-color: #d2f0e0;

  transform: translateY(-1px);

  box-shadow:
    0 5px 16px rgba(15, 169, 104, 0.06);
}


/* FLAG */

#countryModal .country-option-flag {
  width: 44px;
  height: 44px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #e7ece9;
  border-radius: 12px;

  background: #ffffff;

  font-size: 25px;

  box-shadow:
    0 3px 10px rgba(15, 23, 42, 0.04);
}


/* NAME + ISO */

#countryModal .country-option-content {
  min-width: 0;

  flex: 1;

  display: flex;
  flex-direction: column;

  align-items: flex-start;

  gap: 3px;
}


#countryModal .country-option-content strong {
  width: 100%;

  overflow: hidden;

  color: #111827;

  font-size: 14px;
  font-weight: 750;

  white-space: nowrap;
  text-overflow: ellipsis;
}


#countryModal .country-option-content span {
  color: #94a3b8;

  font-size: 11px;
  font-weight: 600;

  letter-spacing: 0.6px;
}


/* COUNTRY CODE */

#countryModal .country-option-code {
  flex-shrink: 0;

  padding: 7px 10px;

  border-radius: 9px;

  background: #f4f7f5;

  color: #475569;

  font-size: 12px;
  font-weight: 700;

  white-space: nowrap;
}


#countryModal .country-option:hover
.country-option-code {
  background: #e5f7ee;

  color: #087c4c;
}


/* =========================================================
   ANIMATION
========================================================= */

@keyframes countryModalOpen {

  from {
    opacity: 0;

    transform:
      translateY(12px)
      scale(0.98);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

  #countryModal {
    align-items: flex-end;

    padding: 0;
  }


  #countryModal .topup-modal-card {
    max-width: none;

    width: 100%;

    max-height: 88vh;

    border-radius:
      24px 24px
      0 0;
  }


  #countryModal .topup-modal-header {
    padding:
      21px 18px
      16px;
  }


  #countryModal .topup-modal-header h2 {
    font-size: 21px;
  }


  #countryModal .country-search-box {
    margin:
      14px 15px
      8px;
  }


  #countryModal .country-list {
    padding:
      7px 9px
      18px;
  }


  #countryModal .country-option {
    min-height: 64px;

    padding:
      9px 10px;

    gap: 11px;
  }


  #countryModal .country-option-flag {
    width: 42px;
    height: 42px;

    font-size: 23px;
  }


  #countryModal .country-option-code {
    padding:
      6px 8px;

    font-size: 11px;
  }

}