/* ==========================================================================
   MINDAXIS CRM - WHATSAPP ENQUIRY MODAL & FEEDBACK STYLES
   Levtron Instruments Pvt. Ltd. Design System
   ========================================================================== */

/* Modal Backdrop */
.crm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 47, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.crm-modal-backdrop.crm-active {
  opacity: 1;
  visibility: visible;
}

/* Modal Dialog */
.crm-modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(10, 25, 47, 0.4), 0 0 0 1px rgba(0, 210, 255, 0.15);
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Plus Jakarta Sans', 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
  box-sizing: border-box;
}

.crm-modal-backdrop.crm-active .crm-modal-dialog {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.crm-modal-header {
  background: linear-gradient(135deg, #0a192f 0%, #172a45 100%);
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 3px solid #25D366;
  position: relative;
}

.crm-modal-header-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.crm-modal-icon-badge {
  width: 46px;
  height: 46px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  flex-shrink: 0;
}

.crm-modal-title-wrap h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.crm-modal-title-wrap p {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.35;
}

.crm-modal-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.crm-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: rotate(90deg);
}

/* Modal Body */
.crm-modal-body {
  padding: 24px;
  max-height: 85vh;
  overflow-y: auto;
}

/* Form Controls */
.crm-form-group {
  margin-bottom: 16px;
}

.crm-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.crm-req {
  color: #ef4444;
  font-weight: 700;
}

.crm-input,
.crm-select,
.crm-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-sizing: border-box;
}

.crm-input:focus,
.crm-select:focus,
.crm-textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: #00d2ff;
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.18);
}

.crm-input.crm-invalid,
.crm-select.crm-invalid {
  border-color: #ef4444;
  background: #fef2f2;
}

.crm-field-error {
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 4px;
  display: none;
}

.crm-field-error.crm-visible {
  display: block;
}

/* Feedback Banners */
.crm-feedback-banner {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.45;
  margin-bottom: 16px;
  display: none;
}

.crm-banner-success {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
}

.crm-banner-error {
  background: #fef2f2;
  border: 1px solid #f87171;
  color: #991b1b;
}

.crm-banner-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}

.crm-banner-btn-primary {
  background: #25D366;
  color: #ffffff;
}

.crm-banner-btn-primary:hover {
  background: #1ebd59;
}

.crm-banner-btn-secondary {
  background: #0f172a;
  color: #ffffff;
}

.crm-banner-btn-secondary:hover {
  background: #1e293b;
}

/* Modal Actions */
.crm-modal-footer {
  margin-top: 20px;
}

.crm-submit-btn {
  width: 100%;
  padding: 12px 16px;
  background: #25D366;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.98rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.crm-submit-btn:hover:not(:disabled) {
  background: #1ebd59;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.crm-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.crm-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: crm-spin 0.8s linear infinite;
}

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

.crm-disclaimer {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  margin-top: 10px;
  line-height: 1.4;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .crm-modal-dialog {
    margin: 10px;
    border-radius: 14px;
  }
  .crm-modal-header {
    padding: 16px 18px;
  }
  .crm-modal-body {
    padding: 18px;
  }
}

