/* frontend/css/sendmoneyMain.css */

.sendmoneyMain-container {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 24px !important;
  background: #f4f7fa;
  min-height: calc(100vh - 120px);
  box-sizing: border-box;
  overflow-y: auto !important;
  max-width: 520px;
  margin: 0 auto;
}

/* Header Section */
.sendmoney-header-section {
  margin-bottom: 20px;
}
.header-top-row {
  margin-bottom: 12px;
}
.back-link {
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Fixed alignment header layout */
.header-main-content {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.send-main-icon {
  width: 48px;
  height: 48px;
  background: #00b050;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 176, 80, 0.2);
  padding: 10px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.mpesa-img-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.25);
}

.header-text-block {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.header-text-block h1 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 2px 0;
}

.header-text-block p {
  font-size: 12px;
  color: #4b5563;
  margin: 0;
  line-height: 1.35;
}

/* Right Illustration Graphic */
.header-illustration {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
/* Right Illustration Graphic */
.header-illustration {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
}

.header-mpesa-graphic-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.graphic-badge {
  font-size: 9px;
  font-weight: 800;
  background: #00b050;
  color: #fff;
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Stepper Bar */
.stepper-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}
.stepper-line {
  position: absolute;
  top: 14px;
  left: 35px;
  right: 35px;
  height: 2px;
  background: #e5e7eb;
  z-index: 1;
}
.stepper-line-fill {
  height: 100%;
  background: #00b050;
}
.step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.step-label {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
}
.step-item.active .step-circle {
  background: #00b050;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 176, 80, 0.15);
}
.step-item.active .step-label {
  color: #00b050;
  font-weight: 700;
}

/* Form Card Container */
.form-card-container {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid #f3f4f6;
}

/* Input Groups */
.input-group {
  margin-bottom: 20px;
}
.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}
.input-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  transition: all 0.2s ease;
}
.input-field-wrap:focus-within {
  border-color: #00b050;
  box-shadow: 0 0 0 3px rgba(0, 176, 80, 0.1);
}

/* Left prefix box with vertical separator line */
.input-prefix-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 100%;
  color: #6b7280;
  font-size: 16px;
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.input-prefix-badge.text-badge {
  width: 58px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.3px;
}

.input-field-wrap input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #111827;
  font-weight: 500;
  padding: 0 14px;
}
.input-field-wrap input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}
.input-helper {
  display: block;
  font-size: 11px;
  color: #6b7280;
  margin-top: 6px;
}
.amount-limits-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #6b7280;
  margin-top: 6px;
}
.prefix-img-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
/* Primary Button */
.btn-primary-green {
  width: 100%;
  background: #00b050;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  height: 52px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(0, 176, 80, 0.25);
  transition: background 0.2s ease;
}
.btn-primary-green:hover {
  background: #009643;
}

/* Secure Notice Footer */
.secure-transaction-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #00b050;
  margin-top: 16px;
  font-weight: 600;
}

/* Decorative corner ribbons (Original Background Implementation) */
.sendmoneyMain-container::before,
.sendmoneyMain-container::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Upper-left sweeping ribbons */
.sendmoneyMain-container::before {
  background:
    linear-gradient(
      132deg,
      transparent 0%,
      transparent 9%,
      rgba(65, 184, 92, 0.09) 9.2%,
      rgba(65, 184, 92, 0.09) 17%,
      transparent 17.2%,
      transparent 21%,
      rgba(65, 184, 92, 0.055) 21.2%,
      rgba(65, 184, 92, 0.055) 25%,
      transparent 25.2%
    );
}

/* Lower-right sweeping ribbons */
.sendmoneyMain-container::after {
  background:
    linear-gradient(
      312deg,
      transparent 0%,
      transparent 10%,
      rgba(65, 184, 92, 0.09) 10.2%,
      rgba(65, 184, 92, 0.09) 18%,
      transparent 18.2%,
      transparent 22%,
      rgba(65, 184, 92, 0.055) 22.2%,
      rgba(65, 184, 92, 0.055) 26%,
      transparent 26.2%
    );
}
/* ===========================
   STEP 2 CONFIRMATION STYLES
   =========================== */
.confirm-summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}


.confirm-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.confirm-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.confirm-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #00b050;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.confirm-icon-badge.green-bg {
  background: #00b050;
  color: #ffffff;
}

.confirm-text-col {
  display: flex;
  flex-direction: column;
}

.confirm-label-small {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

.confirm-val-bold {
  font-size: 14px;
  color: #111827;
  font-weight: 700;
  margin-top: 1px;
}

.confirm-sub-note {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 1px;
}

.confirm-divider {
  border: none;
  border-top: 1px solid #f3f4f6;
  margin: 4px 0;
}


.confirm-total-box {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}


.confirm-total-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.confirm-total-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
}

.confirm-total-amount {
  font-size: 16px;
  font-weight: 800;
  color: #00b050;
}


.back-text-container {
  text-align: center;
  margin-top: 8px;
}


.btn-text-back {
  background: transparent;
  border: none;
  color: #00b050;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-text-back:hover {
  text-decoration: underline;
}
/* Completed Stepper State (Green) */
.step-item.completed .step-circle {
  background: #00b050 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(0, 176, 80, 0.15);
}
.step-item.completed .step-label {
  color: #00b050 !important;
  font-weight: 700;
}

/* Fix Step 2 bottom clipping without changing shared navigation */
.sendmoneyMain-container {
  min-height: 0;
  padding-bottom: 100px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

#step2View {
  padding-bottom: 12px;
}

#step2View .back-text-container {
  margin-top: 4px;
  padding-bottom: 8px;
}

#step2View .btn-primary-green {
  margin-top: 12px;
}
/* ===========================
   STEP 3 M-PESA KEYPAD & PIN STYLES (Proportional 75% Scale)
   =========================== */
.mpesa-pin-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 3.75px; /* 5px * 0.75 */
}

.mpesa-dots-row {
  display: flex;
  justify-content: center;
  gap: 12px; /* 16px * 0.75 */
  margin-bottom: 16.5px; /* 22px * 0.75 */
  background: #ffffff;
  padding: 9px 26.25px; /* 12px 35px * 0.75 */
  border-radius: 22.5px; /* 30px * 0.75 */
  border: 1px solid #e5e7eb;
  box-shadow: 0 1.5px 4.5px rgba(0, 0, 0, 0.03); /* scaled */
}

.mpesa-dot {
  width: 10.5px; /* 14px * 0.75 */
  height: 10.5px; /* 14px * 0.75 */
  border-radius: 50%;
  background-color: #e5e7eb;
  transition: background-color 0.2s ease;
}

.mpesa-dot.filled {
  background-color: #00b050;
}

.mpesa-keypad {
  display: flex;
  flex-direction: column;
  gap: 9px; /* 12px * 0.75 */
  width: 100%;
  max-width: 240px; /* 320px * 0.75 */
  margin-bottom: 6px; /* 8px * 0.75 */
}

.keypad-row {
  display: flex;
  justify-content: space-between;
  gap: 11.25px; /* 15px * 0.75 */
}

.keypad-btn {
  flex: 1;
  height: 39px; /* 52px * 0.75 */
  background-color: #f8f9fa;
  border: 1px solid #eaeaea;
  border-radius: 9px; /* 12px * 0.75 */
  font-size: 15px; /* 20px * 0.75 */
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.keypad-btn:active {
  background-color: #e2e8f0;
  transform: scale(0.96);
}

.empty-key {
  background-color: transparent;
  border: none;
  cursor: default;
}

.delete-btn {
  background-color: transparent;
  border: none;
  font-size: 13.5px; /* 18px * 0.75 */
  color: #4b5563;
}
/* ===========================
   M-PESA MAGIC PIN DOT ANIMATIONS
   =========================== */
@keyframes mpesaPulse {
  0% {
    transform: scale(1);
    background-color: #00b050;
    box-shadow: 0 0 0 0 rgba(0, 176, 80, 0.4);
  }
  50% {
    transform: scale(1.35);
    background-color: #00dc63;
    box-shadow: 0 0 10px 4px rgba(0, 176, 80, 0.6);
  }
  100% {
    transform: scale(1);
    background-color: #00b050;
    box-shadow: 0 0 0 0 rgba(0, 176, 80, 0);
  }
}

.mpesa-dot.filled {
  background-color: #00b050;
  transition: all 0.2s ease;
}

/* Magical bouncing/pulsing animation when all 4 digits are entered */
.mpesa-dot.processing {
  animation: mpesaPulse 0.6s infinite ease-in-out;
}

/* Stagger the pulse effect for each dot so they ripple */
.mpesa-dot.processing:nth-child(1) { animation-delay: 0s; }
.mpesa-dot.processing:nth-child(2) { animation-delay: 0.15s; }
.mpesa-dot.processing:nth-child(3) { animation-delay: 0.3s; }
.mpesa-dot.processing:nth-child(4) { animation-delay: 0.45s; }
/* ===========================
   STEP 4 SUCCESS SCREEN STYLES
   =========================== */
.success-icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

.success-big-circle {
  width: 64px;
  height: 64px;
  background-color: #00b050;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 16px rgba(0, 176, 80, 0.3);
  margin-bottom: 12px;
}

.success-title {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px 0;
}

.confirmed-badge {
  background-color: #e8f5e9;
  color: #00b050;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.tx-ref-card {
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tx-ref-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tx-ref-icon {
  font-size: 22px;
  color: #00b050;
}

.tx-ref-text {
  display: flex;
  flex-direction: column;
}

.tx-ref-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

.tx-ref-val {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.5px;
}

.tx-ref-confirmed-tag {
  color: #00b050;
  font-size: 12px;
  font-weight: 700;
}

.success-message-box {
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.success-message-box p {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
  margin: 0;
}

.view-details-container {
  text-align: center;
  margin-top: 12px;
}

.btn-text-green {
  background: transparent;
  border: none;
  color: #00b050;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-text-green:hover {
  text-decoration: underline;
}

/* Floynex in-app error popup */
.app-error-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 99999;
}

.app-error-modal {
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 18px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.app-error-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff0f0;
  color: #dc2626;
  border: 2px solid #dc2626;
  font-size: 36px;
  font-weight: 700;
  line-height: 52px;
}

.app-error-modal h3 {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: 20px;
}

.app-error-modal p {
  margin: 0 0 22px;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}

.app-error-modal button {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: #dc2626;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
