/* ===== RESET ===== */

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

body {
  font-family: "Inter", sans-serif;

  background: #f3f5f9;

  color: #0a2342;
}

.container {
  max-width: 900px;

  margin: auto;

  padding: 0 20px;
}

/* ===== HEADER ===== */

.page-header {
  background: #4b38f5;

  color: white;

  padding: 18px 0;
}

.page-header .container {
  display: flex;

  align-items: center;

  gap: 20px;
}

.back-btn {
  color: white;

  text-decoration: none;

  font-weight: 600;
}

/* ===== MAIN ===== */

.wire-form-page {
  padding: 50px 0;
}

.wire-form-page h1 {
  margin-bottom: 10px;
}

.subtitle {
  color: #666;

  margin-bottom: 35px;
}

/* ===== FORM ===== */

.wire-form {
  background: white;

  padding: 35px;

  border-radius: 18px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);

  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 22px;
}

/* Fields */

.form-group {
  display: flex;

  flex-direction: column;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.9rem;

  margin-bottom: 6px;

  font-weight: 600;
}

input,
select,
textarea {
  padding: 11px 14px;

  border-radius: 10px;

  border: 1px solid #ccc;

  font-size: 0.9rem;

  outline: none;

  transition: 0.3s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #4b38f5;

  box-shadow: 0 0 0 2px rgba(75, 56, 245, 0.15);
}

/* Hide Fields */

.hidden {
  display: none;
}

/* Readonly Input */

input[readonly] {
  background: #f1f3f8;

  color: #555;

  cursor: not-allowed;
}

/* Button */

.submit-btn {
  grid-column: 1 / -1;

  padding: 14px;

  border: none;

  border-radius: 25px;

  background: #4b38f5;

  color: white;

  font-size: 1rem;

  font-weight: 600;

  cursor: pointer;

  transition: 0.3s;
}

.submit-btn:hover {
  background: #3726cc;
}

/* Mobile */

@media (max-width: 700px) {
  .wire-form {
    grid-template-columns: 1fr;
  }
}

/* Beneficiary Message */

.beneficiary-msg {
  margin-top: 5px;

  font-size: 0.8rem;

  color: #d9534f;

  display: none;
}

/* Manual Entry Mode */

.manual-input {
  background: #fff !important;

  border-color: #4b38f5 !important;

  cursor: text !important;
}

/* Remove Number Arrows */

.amount-input::-webkit-inner-spin-button,
.amount-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.amount-input {
  -moz-appearance: textfield;
}

/* ================= LOADING ================= */

.loading-screen {
  position: fixed;

  inset: 0;

  background: rgba(255, 255, 255, 0.9);

  display: none;

  justify-content: center;

  align-items: center;

  z-index: 9999;
}

.loader-box {
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;

  border: 5px solid #ddd;

  border-top: 5px solid #4b38f5;

  border-radius: 50%;

  animation: spin 1s linear infinite;

  margin: auto;
  margin-bottom: 15px;
}

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

/* ================= OTP ================= */

.otp-modal {
  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.5);

  display: none;

  justify-content: center;

  align-items: center;

  z-index: 10000;
}

.otp-box {
  background: white;

  padding: 35px;

  border-radius: 16px;

  width: 100%;
  max-width: 380px;

  text-align: center;

  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.otp-box h3 {
  margin-bottom: 10px;
}

.otp-box p {
  font-size: 0.9rem;

  color: #555;

  margin-bottom: 20px;
}

.otp-box input {
  width: 100%;

  padding: 12px;

  font-size: 1.1rem;

  text-align: center;

  letter-spacing: 4px;

  border-radius: 10px;

  border: 1px solid #ccc;

  margin-bottom: 18px;
}

.otp-box button {
  width: 100%;

  padding: 12px;

  background: #4b38f5;

  color: white;

  border: none;

  border-radius: 25px;

  font-weight: 600;

  cursor: pointer;
}

.otp-box button:hover {
  background: #3726cc;
}

/* ================= RECEIPT ================= */

.receipt-modal {
  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.6);

  display: none;

  justify-content: center;
  align-items: center;

  z-index: 11000;
}

.receipt-box {
  background: white;

  padding: 35px;

  border-radius: 18px;

  width: 100%;
  max-width: 420px;

  text-align: center;

  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.receipt-box h2 {
  color: #2d7d46;

  margin-bottom: 10px;
}

.receipt-check {
  font-size: 2.5rem;

  color: #2d7d46;

  margin-bottom: 10px;
}

.receipt-main {
  font-size: 0.95rem;

  color: #333;

  margin-bottom: 25px;

  line-height: 1.5;
}

/* Details */

.receipt-details {
  border-top: 1px solid #ddd;

  padding-top: 20px;

  margin-bottom: 25px;

  text-align: left;
}

.receipt-details div {
  display: flex;

  justify-content: space-between;

  margin-bottom: 10px;

  font-size: 0.9rem;
}

.receipt-details span {
  color: #666;
}

.success {
  color: #2d7d46;
}

/* Button */

.receipt-btn {
  width: 100%;

  padding: 12px;

  border: none;

  border-radius: 25px;

  background: #4b38f5;

  color: white;

  font-weight: 600;

  cursor: pointer;

  transition: 0.3s;
}

.receipt-btn:hover {
  background: #3726cc;
}

/* ========== RECEIPT MODAL ========== */

.receipt-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);

  display: none;
  justify-content: center;
  align-items: center;

  z-index: 9999;
}

/* Card */

.receipt-card {
  background: #fff;
  width: 95%;
  max-width: 500px;

  border-radius: 16px;
  padding: 25px;

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);

  animation: popUp 0.4s ease;
}

/* Header */

.receipt-header {
  text-align: center;
  margin-bottom: 25px;
}

.receipt-logo {
  width: 60px;
  margin-bottom: 10px;
}

.success-icon {
  width: 60px;
  height: 60px;

  background: #28a745;
  color: white;

  font-size: 28px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 10px auto;
}

.receipt-header h2 {
  margin: 10px 0;
  color: #021633;
}

.receipt-note {
  font-size: 0.85rem;
  color: #555;
}

/* Details */

.receipt-details h3 {
  margin: 20px 0 10px;
  color: #021633;
}

.detail-row {
  display: flex;
  justify-content: space-between;

  padding: 8px 0;
  border-bottom: 1px solid #eee;

  font-size: 0.9rem;
}

.detail-row span:last-child {
  font-weight: 600;
}

/* Buttons */

.receipt-actions {
  display: flex;
  gap: 15px;

  margin-top: 25px;
}

.share-btn,
.done-btn {
  flex: 1;

  padding: 12px;

  border: none;
  border-radius: 8px;

  cursor: pointer;
  font-weight: 600;
}

.share-btn {
  background: #f1f1f1;
  color: #021633;
}

.done-btn {
  background: #021633;
  color: white;
}

.share-btn:hover {
  background: #ddd;
}

.done-btn:hover {
  background: #000c22;
}

/* Animation */

@keyframes popUp {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── RECEIPT MODAL ── */
.receipt-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  overflow-y: auto;
  padding: 20px;
}
.receipt-modal.open,
.receipt-modal[style*="flex"] {
  display: flex;
}
.receipt-card-wrap {
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
  animation: receiptUp 0.3s ease;
  margin: auto;
}
@keyframes receiptUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.receipt-header {
  background: linear-gradient(135deg, #021633, #0a2342);
  padding: 32px 28px;
  text-align: center;
  color: white;
}
.receipt-check {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.8rem;
}
.receipt-check-green {
  background: #00c896;
  color: white;
  box-shadow: 0 6px 20px rgba(0, 200, 150, 0.4);
}
.receipt-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.receipt-subtitle {
  font-size: 0.72rem;
  opacity: 0.55;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.receipt-amount-box {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
}
.receipt-amount-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.6;
  margin-bottom: 6px;
}
.receipt-big-amount {
  font-size: 2.2rem;
  font-weight: 800;
}
.receipt-from-label {
  font-size: 0.78rem;
  opacity: 0.65;
  margin-top: 6px;
}
.receipt-body {
  padding: 24px 28px;
}
.receipt-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #999;
  margin-bottom: 12px;
}
.receipt-details .detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 0.88rem;
  gap: 12px;
}
.receipt-details .detail-row:last-child {
  border-bottom: none;
}
.receipt-details .detail-row span:first-child {
  color: #888;
  flex-shrink: 0;
}
.receipt-details .detail-row span:last-child,
.receipt-details .detail-row strong {
  text-align: right;
  font-weight: 600;
  color: #0a2342;
  word-break: break-word;
}
.receipt-mono {
  font-family: monospace;
  font-size: 0.8rem;
}
.receipt-status-ok {
  color: #2e7d32;
  font-weight: 700;
}
.receipt-footer {
  padding: 0 28px 28px;
}
.receipt-notice {
  background: #f3f5f9;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 0.76rem;
  color: #888;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 16px;
}
.receipt-actions {
  display: flex;
  gap: 10px;
}
.receipt-btn {
  flex: 1;
  padding: 13px;
  border: none;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  transition: 0.2s;
}
.receipt-btn.share {
  background: #f0f2ff;
  color: #4b38f5;
}
.receipt-btn.share:hover {
  background: #e3e7ff;
}
.receipt-btn.done {
  background: linear-gradient(135deg, #021633, #0a2342);
  color: white;
}
.receipt-btn.done:hover {
  opacity: 0.9;
}
.inj-row {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 0.88rem;
}

/* ── Receipt logo ── */
.receipt-logo-row {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.receipt-logo-img {
  height: 52px;
  width: auto;
  max-width: 140px;
  border-radius: 8px;
  object-fit: contain;
  border: none;
  display: block;
  margin: 0 auto 10px;
}
.receipt-bank-name {
  display: none;
}

/* ── Receipt capture quality ── */
.receipt-card-wrap {
  width: 400px !important;
  max-width: 400px !important;
  font-family: "Inter", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  text-rendering: optimizeLegibility !important;
}
.receipt-header {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* ── Bank search input (datalist) ── */
#bankSelect {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e0e4ee;
  border-radius: 12px;
  font-size: 0.92rem;
  font-family: "Inter", sans-serif;
  color: #021633;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}
#bankSelect:focus {
  border-color: #4b38f5;
}
#bankSelect::placeholder {
  color: #aaa;
}

/* ── Fix transaction amount overflow ── */
.detail-row {
  overflow: hidden;
}
.detail-row span:last-child,
.detail-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}
