/* PriyoKhata Pay - Ultra-Clean, Sleek & Modern UI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Noto+Sans+Bengali:wght@400;500;600&display=swap');

:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #F0FDF4;
  --text-main: #1E293B;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --border-light: #E2E8F0;
  --border-focus: #10B981;
  --radius-card: 20px;
  --radius-btn: 12px;
  --radius-input: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  min-height: 100%;
  min-height: 100dvh;
}

body {
  font-family: 'Noto Sans Bengali', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.checkout-wrapper {
  width: 100%;
  max-width: 410px;
  margin: auto;
}

/* Card Container */
.checkout-container {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

/* Header */
.checkout-header {
  padding: 24px 20px 16px;
  text-align: center;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.15);
  display: block;
  object-fit: cover;
}

.brand-title {
  font-size: 21px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: #047857;
  background: #F0FDF4;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #BBF7D0;
}

/* Body Content */
.checkout-body {
  padding: 20px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Plan Selection List */
.plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.plan-item {
  position: relative;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
  background: #FFFFFF;
  user-select: none;
}

.plan-item:hover {
  border-color: #CBD5E1;
}

.plan-item.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.plan-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Radio circle */
.plan-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: white;
}

.plan-item.active .plan-radio {
  border-color: var(--primary);
}

.plan-radio-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transform: scale(0.4);
  transition: all 0.15s ease;
}

.plan-item.active .plan-radio-dot {
  opacity: 1;
  transform: scale(1);
}

.plan-details h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.3;
}

.plan-details p {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

.plan-price-tag {
  text-align: right;
  flex-shrink: 0;
}

.plan-price-num {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
}

.plan-item.active .plan-price-num {
  color: #047857;
}

.popular-chip {
  position: absolute;
  top: -8px;
  right: 12px;
  background: #059669;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 12px;
}

/* Input Section */
.input-section {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-prefix {
  position: absolute;
  left: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
  font-family: 'Inter', sans-serif;
  user-select: none;
}

.phone-field {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 60px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-input);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background: #F8FAFC;
  transition: all 0.15s;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.phone-field:focus {
  outline: none;
  border-color: var(--border-focus);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Order Summary Bar */
.summary-bar {
  background: #F8FAFC;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-input);
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-left {
  display: flex;
  flex-direction: column;
}

.summary-plan-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.summary-user-id {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

.summary-total {
  text-align: right;
}

.summary-total-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 500;
}

.summary-total-price {
  font-size: 18px;
  font-weight: 600;
  color: #047857;
  font-family: 'Inter', sans-serif;
}

/* Payment Badges */
.methods-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 2px;
}

.methods-label {
  font-size: 12px;
  color: var(--text-muted);
}

.badges-group {
  display: flex;
  gap: 5px;
}

.pay-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'Inter', sans-serif;
}

.pill-bkash {
  background: #E2136E;
  color: white;
}

.pill-nagad {
  background: #F7941D;
  color: white;
}

.pill-rocket {
  background: #8C3494;
  color: white;
}

/* Pay Button */
.pay-button {
  width: 100%;
  height: 50px;
  background: #059669;
  color: white;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 600;
  font-family: 'Noto Sans Bengali', 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
  transition: all 0.15s ease;
  user-select: none;
}

.pay-button:hover:not(:disabled) {
  background: var(--primary-hover);
}

.pay-button:active:not(:disabled) {
  transform: scale(0.99);
}

.pay-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.button-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #FFFFFF;
  animation: spin 0.8s linear infinite;
  display: none;
}

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

/* Security Note */
.security-note {
  margin-top: 14px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.copyright-text {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: #94A3B8;
}

/* Alert Error */
.alert-error {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  padding: 10px 14px;
  border-radius: var(--radius-input);
  font-size: 12.5px;
  margin-bottom: 12px;
  display: none;
  text-align: center;
}

/* Status Pages (Success & Cancel) */
.status-wrapper {
  padding: 24px 16px 20px;
  text-align: center;
}

.status-badge-container {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.25);
  animation: pulseRipple 2s infinite ease-out;
}

@keyframes pulseRipple {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.status-circle {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #059669;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.3);
}

.status-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.status-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.4;
}

/* Receipt Card */
.receipt-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: left;
}

.receipt-amount-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px dashed #CBD5E1;
  margin-bottom: 10px;
}

.receipt-amount-label {
  font-size: 12px;
  color: var(--text-muted);
}

.receipt-amount-value {
  font-size: 24px;
  font-weight: 700;
  color: #047857;
  font-family: 'Inter', sans-serif;
}

.receipt-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 7px;
}

.receipt-item-row:last-child {
  margin-bottom: 0;
}

.receipt-item-key {
  color: var(--text-muted);
}

.receipt-item-val {
  font-weight: 600;
  color: var(--text-main);
  text-align: right;
}

.copy-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  outline: none;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-family: 'Inter', monospace;
  font-weight: 500;
  color: #475569;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.copy-badge:hover {
  background: #E2E8F0;
  color: #0F172A;
  border-color: #94A3B8;
}

.copy-badge:active {
  transform: scale(0.96);
}

.badge-method {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Auto-redirect Banner */
.auto-redirect-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  text-align: center;
}

.auto-redirect-text {
  font-size: 12px;
  font-weight: 500;
  color: #166534;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: #DCFCE7;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #059669;
  width: 100%;
  border-radius: 2px;
  animation: drainProgress 2.2s linear forwards;
}

@keyframes drainProgress {
  0% { width: 100%; }
  100% { width: 0%; }
}

.btn-return-app {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 48px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
  transition: background 0.15s;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.btn-return-app:hover {
  background: var(--primary-hover);
}

.btn-plain {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  background: transparent;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-btn);
  font-weight: 500;
  font-size: 12.5px;
  border: 1px solid var(--border-light);
}

.btn-plain:hover {
  background: #F1F5F9;
  color: var(--text-main);
}
