/* Period Selection Styles (v2 - Telegram-like design) */
.pay-method-block {
  margin-top: 16px;
  margin-bottom: 18px;
}

.pay-backup-block {
  margin: 8px 0 10px;
}

.pay-backup-block .pay-row {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  align-items: center;
}

.pay-backup-block .pay-row > span,
.pay-backup-block .pay-row > strong {
  line-height: 1;
}

.pay-backup-block #payBackupDate {
  color: #fff;
  line-height: 1;
}

.pay-backup-toggle-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 42px;
  line-height: 1;
}

.pay-backup-switch {
  position: relative;
  width: 42px;
  height: 24px;
  display: inline-block;
  transform: translateY(3px);
}

.pay-backup-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pay-backup-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  transition: .2s ease;
}

.pay-backup-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: .2s ease;
}

.pay-backup-switch input:checked + .pay-backup-slider {
  background: linear-gradient(180deg,#ff6b6b 0%,#ff4d4d 58%,#e63f3f 100%);
}

.pay-backup-switch input:checked + .pay-backup-slider::before {
  transform: translateX(18px);
}

.pay-method-block label,
#payModal .pay-email-field label {
  display: block;
  margin: 0 0 8px 0;
  padding: 0;
  line-height: 1;
  color: #cbb7be;
  font-size: 14px;
  font-weight: 500;
}

#payModal .pay-email-field {
  margin-bottom: 8px;
}

#payModal .pay-email-field label {
  margin: 0 0 6px 0;
}

.pay-method-field {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: #ffffff0a;
  color: #e8d8de;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 14px;
  box-sizing: border-box;
}

.pay-method-icon {
  width: 34px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  overflow: hidden;
  border-radius: 6px;
}

.pay-method-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.18);
  display: block;
}

.pay-method-text {
  flex: 0 1 auto;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.pay-method-arrow {
  margin-left: auto;
  color: #bfa9b0;
  font-size: 20px;
  line-height: 1;
  font-weight: 500;
}

.period-selection {
  width: 100%;
}

.period-grid {
  display: grid;
  gap: 10px !important;
}

.period-selection .period-grid:first-child {
  margin-bottom: 10px !important;
}

.period-btn {
  position: relative;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 54px;
  justify-content: center;
}

.period-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.period-btn.active {
  background: linear-gradient(180deg, #ff6b6b24, #ff4d4d14), #ffffff0a;
  border-color: rgba(255, 255, 255, 0.1);
}
.period-btn.active.promo-active {
  background: linear-gradient(180deg, #3ddc8424, #3ddc8414), #ffffff0a;
  border-color: rgba(61, 220, 132, 0.25);
}

.period-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  line-height: 1.1;
}

.period-price {
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif !important;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
  line-height: 1;
}

#payModal #payTotal {
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif !important;
  font-weight: 700;
  line-height: 1;
}

.period-btn.active .period-price {
  color: #ff4d4d;
}
.period-btn.active.promo-active .period-price {
  color: #3ddc84;
}

.period-discount {
  display: none;
}

.period-badge {
  display: none;
}

.period-save {
  display: none;
}

@media (max-width: 600px) {
  .period-btn {
    padding: 8px 6px;
    min-height: 64px;
  }
  
  .period-name {
    font-size: 12px;
  }
  
  .period-price {
    font-size: 18px;
  }
}

/* Email & promo placeholder styling */
#payReceiptEmail::placeholder,
#payPromoInput::placeholder {
  color: #666;
  opacity: 1;
}
#payReceiptEmail:-webkit-autofill,
#payReceiptEmail:-webkit-autofill:hover,
#payReceiptEmail:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,0.04) inset;
  caret-color: #fff;
  border-color: rgba(255,255,255,.12);
}
