/* Theme-Independent WhatsApp OTP Forms */

.jalpi-ln-otp-wrapper {
  max-width: 480px;
  margin: 30px auto !important;
  padding: 32px !important;
  background: #ffffff !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif !important;
}
div#jalpi_ln_flow_form_status {
    color: red;
    font-weight: 500;
}
.jalpi-ln-otp-wrapper * {
  box-sizing: border-box;
}

/* Grid Layout */
.jalpi-ln-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 15px;
  margin-bottom: 15px;
}
.jalpi-ln-country {
  height: auto; /* default for larger screens */
}

@media (max-width: 640px) {
  .jalpi-ln-grid {
    display: flex;
    flex-direction: column;
}
   .jalpi-ln-country {
    height: 50px !important;
    font-size: 16px !important;
    padding: 10px !important;
    appearance: none; /* optional: removes native styling */
  }
  
  .jalpi-ln-otp-wrapper {
    margin: 20px 15px !important;
    padding: 15px !important;
  }

}

/* Form Fields */
.jalpi-ln-field {
  margin-bottom: 18px;
}

.jalpi-ln-field label {
  display: block;
  font-weight: 600 !important;
  margin-bottom: 8px !important;
  color: #1d2327 !important;
  font-size: 14px !important;
}

.jalpi-ln-field input,
.jalpi-ln-field select {
  width: 100% !important;
  padding: 8px 15px !important;
  border: 2px solid #e0e0e0 !important;
  border-radius: 6px !important;
  font-size: 15px !important;
  background: #fff !important;
  color: #1d2327 !important;
  transition: border-color 0.2s ease;
  font-family: inherit !important;
  line-height: normal !important;
}

.jalpi-ln-field input:focus,
.jalpi-ln-field select:focus {
  border-color: #2271b1 !important;
  outline: none !important;
  box-shadow: 0 0 0 1px #2271b1 !important;
}

.jalpi-ln-field input::placeholder {
  color: #999 !important;
}

/* Country Select */
.jalpi-ln-field select.jalpi-ln-country {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px !important;
  padding-right: 35px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

/* Email Field (Register) */
.jalpi-ln-field-email {
  grid-column: span 2;
}

/* Actions */
.jalpi-ln-actions {
  /* display: flex; */
  align-items: center;
  gap: 12px;
  margin: 20px 0 15px;
}

.jalpi-ln-actions .button,
.jalpi-ln-actions button {
  /* flex: 1; */
  padding: 14px 20px !important;
  background: #2271b1 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
  text-align: center;
  text-decoration: none !important;
  line-height: normal !important;
}

.jalpi-ln-actions .button:hover,
.jalpi-ln-actions button:hover {
  background: #135e96 !important;
}

.jalpi-ln-actions .button:disabled,
.jalpi-ln-actions button:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* Status Messages */
.jalpi-ln-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 8px 12px !important;
  border-radius: 5px !important;
  margin: 0 !important;
}

.jalpi-ln-status-send,
.jalpi-ln-status-verify {
  width: 100%;
  margin-top: 10px !important;
}

.jalpi-ln-status.success {
  background: #d4edda !important;
  color: #155724 !important;
  border: 1px solid #c3e6cb !important;
}

.jalpi-ln-status.error {
  background: #f8d7da !important;
  color: #721c24 !important;
  border: 1px solid #f5c6cb !important;
}

.jalpi-ln-status.info {
  background: #d1ecf1 !important;
  color: #0c5460 !important;
  border: 1px solid #bee5eb !important;
}

/* OTP Input Field */
.jalpi-ln-otp-field {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
}

.jalpi-ln-otp-input {
  font-size: 24px !important;
  letter-spacing: 12px !important;
  text-align: center !important;
  font-weight: 600 !important;
  padding: 16px !important;
  border: 2px solid #e0e0e0 !important;
  border-radius: 8px !important;
  width: 100% !important;
  background: #f9f9f9 !important;
}

.jalpi-ln-otp-input:focus {
  border-color: #2271b1 !important;
  background: #fff !important;
  box-shadow: 0 0 0 1px #2271b1 !important;
}

/* Hints */
.jalpi-ln-hint {
  display: block;
  color: #666 !important;
  font-size: 13px !important;
  margin-top: 6px !important;
  font-style: italic;
  line-height: 1.5 !important;
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
  .jalpi-ln-otp-wrapper {
    background: white !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
  }
  
  .jalpi-ln-field label {
    color: #e0e0e0 !important;
  }
  
  .jalpi-ln-field input,
  .jalpi-ln-field select {
    background: #2d2d2d !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
  }
  
  .jalpi-ln-field input:focus,
  .jalpi-ln-field select:focus {
    border-color: #4a9eff !important;
    box-shadow: 0 0 0 1px #4a9eff !important;
  }
  
  .jalpi-ln-otp-input {
    background: #2d2d2d !important;
  }
  
  .jalpi-ln-otp-input:focus {
    background: #1a1a1a !important;
  }
}
