/* ==================== RESET & CSS VARIABLES ==================== */
:root {
  /* Colors */
  --color-primary: #283b51;
  --color-secondary: #41aece;
  --color-light: #f5f7fa;
  --color-dark: #212222;
  --color-gray: #717171;
  --color-light-gray: #cdcbcb;
  --color-error: #f19c9c;
  --color-info: #586677;
  --color-bg-info: #ecfbff;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 0.75rem;
  --spacing-lg: 1rem;
  --spacing-xl: 1.5rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 15px;
  --radius-xl: 20px;
  
  /* Font Sizes */
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-xxl: 2rem;
  
  /* Z-index */
  --z-index-overlay: 999;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--color-light);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.4;
  color: var(--color-dark);
  font-size: var(--font-size-base);
}

img {
  vertical-align: middle;
  max-width: 100%;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  cursor: pointer;
}

.container {
  padding: 0 30px;
}

/* ==================== FORM ELEMENTS ==================== */
input,
button {
  border: none;
  outline: none;
  font-family: inherit;
}

input::placeholder {
  color: #aaa;
}

button {
  cursor: pointer;
}

/* ==================== HEADER ==================== */
.header {
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  /* border-bottom: 1px solid #e5edef; */
}

.header.black {
  background-color: #000;
}

.header .logo {
  width: 120px;
  height: 38px;
  background-image: url(../img/logo1.png);
  background-size: contain;
  background-repeat: no-repeat;
}

/* Logo variations (commented out)
.header .shpay-logo {
  width: 99px;
  height: 34px;
  background-image: url(../img/shpay-logo1.png);
  background-size: contain;
  background-repeat: no-repeat;
}

.header .cala-logo {
  width: 50px;
  height: 25px;
  margin-top: -13px;
  background-image: url(../img/cala-logo1.png);
  background-size: contain;
  background-repeat: no-repeat;
}
*/

.header span {
  font-size: var(--font-size-lg);
  margin: 0 10px;
  color: #fff;
}

/* ==================== MAIN ==================== */
.main {
  /* padding: var(--spacing-md); */
}

.title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
}

.caption {
  color: var(--color-info);
  font-size: 13px;
  font-weight: 600;
}

.caption b {
  color: var(--color-primary);
}

/* ==================== ICONS ==================== */
.icon {
  display: block;
  width: 0.85rem;
  height: 0.85rem;
  background-size: contain;
  background-repeat: no-repeat;
  margin-left: var(--spacing-sm);
}

/* Payment method icons */
.icon-master { background-image: url(../img/icon-master.png); }
.icon-visa { background-image: url(../img/icon-visa.png); }
.icon-verve { background-image: url(../img/icon-verve.png); }
.icon-card { background-image: url(../img/icon-card.png); }
.icon-list { background-image: url(../img/icon-list.png); }
.icon-lock { background-image: url(../img/icon-lock.png); }
.icon-right { 
  background-image: url(../img/icon-right.png); 
  width: 1.5rem;
  height: 1.5rem;
}


/* ==================== BUTTONS ==================== */
.btn {
  font-size: var(--font-size-base);
  border-radius: 22px;
  color: #fff;
  background: var(--color-primary);
  border: none;
  width: 100%;
  line-height: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

.btn:disabled {
  background: #798fa8;
  color: #fff;
  cursor: not-allowed;
}

.btn.loading {
  background: #fff4f4;
  color: var(--color-error);
  position: relative;
}

.btn.loading::before {
  content: "";
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-error);
  border-top-color: transparent;
  border-radius: 50%;
  margin-right: var(--spacing-sm);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== INFO BOX ==================== */
.info {
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-bg-info);
  border-radius: var(--radius-md);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
}

.info::before {
  content: "";
  display: block;
  width: 1rem;
  height: 1rem;
  background: url(../img/icon-info.png) no-repeat center/contain;
  margin-right: var(--spacing-md);
}

/* ==================== METHOD & TABS ==================== */
.method {
  /* margin: 0 40px; */
  padding: 20px;
  background-color: #dce8f5;
  border-radius: var(--radius-xl);
}

.method .title {
  text-align: center;
  color: #547193;
  font-weight: 300;
}

.method .amount {
  /* font-weight: bold; */
  text-align: center;
  color: var(--color-primary);
  font-size: var(--font-size-xxl);
  font-weight: 600;
}

.method .tabs {
  margin-top: var(--spacing-md);
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.method .tabs a {
  flex: 1;
  padding: 0.8rem 0;
  text-align: center;
  font-size: var(--font-size-base);
  color: var(--color-dark);
  background: #f8fcff;
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.method .tabs a.active {
  color: #fff;
  background: var(--color-primary);
}

/* ==================== CONTENT MODULES ==================== */
.content { 
  padding: var(--spacing-lg); 
}

.content .mod { 
  display: none; 
}

.content .mod.active { 
  display: block; 
}

/* .bottom { margin-top: 2rem; } */
.bottom .tips { 
  color: var(--color-gray); 
  text-align: center; 
  margin-top: var(--spacing-lg); 
}

.btn-tip { 
  color: red; 
  text-align: center;
  margin-top: var(--spacing-lg); 
}

.bottom_tips {
  background: var(--color-primary);
  padding: 10px;
  width: 100%;
  /* margin: -15px 20px; */
  margin-top: var(--spacing-lg);
  text-align: center;
  color: var(--color-light-gray);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  display: flex;
  justify-content: center;
  align-items: center;
}

.content .title {
  color: var(--color-gray);
  font-size: var(--font-size-xl);
}

/* ==================== PAYMENT METHODS ==================== */
.paymethod {
  margin-top: var(--spacing-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: space-between;
}

.paymethod .item {
  /* flex: 1 1 48%; */
  position: relative;
  margin-bottom: var(--spacing-lg);
  padding: 0 var(--spacing-md);
  /* background: #f4f8fb; */
  background-color: #fff;
  transition: background-color 0.3s ease;
}

.paymethod .item .label { 
  color: var(--color-gray); 
  margin-bottom: var(--spacing-xs); 
}

.paymethod .item .input { 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  flex-grow: 1; 
  height: 46px;
}

.paymethod .item .input input,
.paymethod .item .input span { 
  border: none; 
  outline: none; 
  width: 100%; 
  background: none; 
}

.paymethod .item .input .divider { 
  color: #ccc; 
  margin: 0 var(--spacing-md); 
}

.paymethod .item:focus-within { 
  background: #eaf5ff; 
  border-color: var(--color-primary); 
  border-radius: var(--radius-sm);
}

/* Card payment styles */
.card .item:first-child { 
  width: 100%; 
}

.card .item {
  padding: var(--spacing-sm) var(--spacing-md);
  width: 48%;
  border-bottom: 2px solid #dee5eb;
}
.bank{
  background-color: #fff;
  border-radius: 10px;
}
.bank .item { 
  flex: 1 1 100%; 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  border-radius: 5px;

}
.bank .item .input input,
.bank .item .input span {
  color: #283b51;
  font-weight: bold;
  text-align: right;
}

.ussd {
  height: 10rem;
  background: url(../img/empty.png) center no-repeat;
  background-size: auto 7.5rem;
}

/* Loading & Invalid Message */
.loading,
.invalid {
  display: flex;
  height: 100%;
  width: 100%;
  flex-direction: column;
  position: absolute;
  top: 0;
  z-index: 999;
  background: rgba(170, 170, 170, 0.5);
}

.invalid-main {
  padding: 1rem 2rem;
  border-radius: 5px;
  position: fixed;
  top: 50%;
  left: 50%;
  background-color: var(--bg-primary);
  z-index: 999;
  transform: translate(-50%, -50%);
  background-color: #fff;
}

.loader-logo {
  background: url(../img/logo1.png) no-repeat center bottom;
  background-size: 130px 50px;
  width: 100%;
  height: 50vh;
}

.loader {
  width: 100%;
  height: 50vh;
  display: flex;
  justify-content: center;
  padding-top: 2vh;
}

/* Loader Animation */
#ld4 {
  position: relative;
  display: flex;
  width: 32%;
  justify-content: space-between;
}

#ld4 div {
  height: 10px;
  width: 10px;
  margin-left: 2vh;
  border-radius: 50%;
  background: #d91e36;
}

#ld4 div:nth-child(1) { animation: ld4 3s linear infinite 0s; }
#ld4 div:nth-child(2) { animation: ld4 3s linear infinite 0.15s; }
#ld4 div:nth-child(3) { animation: ld4 3s linear infinite 0.3s; }
#ld4 div:nth-child(4) { animation: ld4 3s linear infinite 0.45s; }
#ld4 div:nth-child(5) { animation: ld4 3s linear infinite 0.6s; }

@keyframes ld4 {
  0% {
    opacity: 0;
    transform: scale(0.5);
    background: #59cd90;
  }
  25% {
    opacity: 1;
    transform: scale(1);
    background: #0072bb;
  }
  50% {
    opacity: 0;
    transform: scale(0.5);
    background: #fe4a49;
  }
  75% {
    opacity: 1;
    transform: scale(1);
    background: #fed766;
  }
  100% {
    opacity: 0;
  }
}
/* ==================== COPY TIP ==================== */
#tip {
  visibility: hidden;
  text-align: center;
  position: absolute;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  top: -30px;
}
#tip.show { visibility: visible; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .method .tabs a { font-size: 0.9rem; }
  /* .paymethod .item { flex: 1 1 100%; } */
  .bottom_tips {  font-size: 0.85rem; }
}

/* ==================== footer ==================== */
.contact {
  line-height: 1.8rem;
  font-size: 12px;
  color: #727272;
  text-align: center;
}
.contact .item {
  display: flex;
  justify-content: center;
  align-items: center;
}
.contact .icons {
  flex-shrink: 0;
  display: flex;
}

/* ======================== 支付成功页面 ========================= */
.result {
  padding: 5rem 0;
  text-align: center;
}

.result .img {
  width: 10rem;
  margin: 0 auto 1rem;
}