













/* Modern Form Styles */
.modern-breadcrumb {
  background: none;
  padding: 20px 0;
  margin: 0;
  list-style: none;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.modern-breadcrumb li {
  display: flex;
  align-items: center;
}

.modern-breadcrumb li + li:before {
  content: "→";
  margin: 0 8px;
  color: #666;
}

.modern-breadcrumb a {
  color: #666;
  text-decoration: none;
}

.modern-breadcrumb .active {
  color: #333;
  font-weight: 500;
}

.modern-form-container {
  background: white;
/*  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);*/
  overflow: visible;
  margin: 20px -40px;
  position: relative;
}

.modern-form-header {
  position: relative;
  padding: 40px;
  background: linear-gradient(135deg, #001b72 0%, #0066cc 100%);
  overflow: hidden;
}

.modern-form-header::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.modern-form-title {
  color: white;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 1;
}

.modern-form-content {
  padding: 40px;
  position: relative;
  overflow: visible;
}

/* Flower Decoration */
.flower-decoration {
  position: absolute;
  right: -175px;
  top: 50%;
  transform: rotate(-90deg);
  z-index: 0;
  pointer-events: none;
}

.flower-decoration img {
  width: 400px;
  height: auto;
  opacity: 0.9;
}

/* Ensure form content is above the flower */
#modernLeadForm {
  position: relative;
  z-index: 1;
}

@media (max-width: 1200px) {
  .flower-decoration {
    right: -50px;
  }
  
  .flower-decoration img {
    width: 300px;
  }
}

@media (max-width: 992px) {
  .flower-decoration {
    display: none;
  }
}

.section-header {
  color: #111111;
  font-family: "ProximaNova-Bold", sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 30px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.form-section:not(:first-child) .section-header {
  margin-top: 50px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}

.form-label.required::after {
  content: " *";
  color: #e74c3c;
}

.form-input, .form-select {
  padding: 12px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
  color: #333;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: #001b72;
  box-shadow: 0 0 0 3px rgba(0, 27, 114, 0.1);
}

.form-input::placeholder {
  color: #999;
}

.phone-input-group {
  display: flex;
  gap: 8px;
}

.country-code-select {
  width: 120px;
  flex-shrink: 0;
}

.phone-number-input {
  flex: 1;
}

.form-select {
  cursor: pointer;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 40px;
}

/* Custom Lookup Styling */
.custom-lookup {
  position: relative;
  display: flex;
}

html[dir="ltr"] .lookup-display {
  flex: 1;
  padding-right: 50px !important;
}

html[dir="rtl"] .lookup-display {
  flex: 1;
  padding-left: 50px !important;
}

html[dir="ltr"] .lookup-btn {
    right: 8px;
}

html[dir="rtl"] .lookup-btn {
    left: 8px;
}

.lookup-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  padding: 4px;
  z-index: 2; /* Ensure lookup button is visible */
}

.lookup-btn:hover {
  color: #001b72;
}

/* Custom Multi-select */
.custom-multiselect {
  position: relative;
}

.multiselect-display {
  padding: 12px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.multiselect-display:hover {
  border-color: #001b72;
}

.multiselect-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding: 8px;
  margin-top: 4px;
}

.multiselect-options label {
  display: block;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
}

.multiselect-options label:hover {
  background: #f5f5f5;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #f0f0f0;
}

.btn {
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  min-width: 124px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-cancel {
  background: white;
  color: #001b72;
  border: 2px solid #001b72;
}

.btn-cancel:hover {
  background: #f8f9ff;
  transform: translateY(-1px);
}

.btn-submit {
  background: #001b72;
  color: white;
  border: 2px solid #001b72;
}

.btn-submit:hover {
  background: #001556;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 27, 114, 0.3);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.validation-message {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 4px;
  min-height: 18px;
}

.form-group.error .form-input,
.form-group.error .form-select,
.form-group.error .lookup-display,
.form-group.error .multiselect-display {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Success Modal */
.modern-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.modern-modal-content {
  background: white;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modern-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modern-modal-close:hover {
  color: #333;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: #27ae60;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.checkmark {
  color: white;
  font-size: 40px;
  font-weight: bold;
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.modal-message {
  color: #666;
  margin-bottom: 30px;
  line-height: 1.5;
}

.modal-button {
  background: #001b72;
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-button:hover {
  background: #001556;
}

/* Style the lookup modal */
.modal-lookup .modal-content {
  border-radius: 8px;
  overflow: hidden;
}

.modal-lookup .modal-header {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 20px;
}

.modal-lookup .modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.modal-lookup .modal-body {
  padding: 20px;
}

.modal-lookup .table {
  margin: 0;
}

.modal-lookup .btn-primary {
  background: #001b72;
  border-color: #001b72;
}

.modal-lookup .btn-primary:hover {
  background: #001556;
  border-color: #001556;
}

/* Override Bootstrap modal backdrop */
.modal-backdrop {
  z-index: 1040 !important;
  position: fixed !important;
}

/* Fix z-index issues for lookup modals */
.modal {
  z-index: 1000000000 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: none;
  overflow: hidden !important;
}

.modal.in {
  display: block !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.modal-dialog {
  position: relative !important;
  width: auto !important;
  margin: 10px !important;
  z-index: 10000 !important;
}

@media (min-width: 768px) {
  .modal-dialog {
    width: 90% !important;
    max-width: 900px !important;
    margin: 30px auto !important;
  }
}

/* Make sure modal content is on top */
.modal-content {
  position: relative !important;
  background-color: #fff !important;
  border: 1px solid rgba(0,0,0,.2) !important;
  border-radius: 6px !important;
  outline: 0 !important;
  box-shadow: 0 5px 15px rgba(0,0,0,.5) !important;
  z-index: 10001 !important;
}

/* Push ONLY the modern form (not the original form) back when modal is open */
body.modal-open #modernLeadForm {
  position: relative !important;
  z-index: 1 !important;
}

/* Force all children of modern form to be behind modal */
body.modal-open #modernLeadForm * {
  z-index: 1 !important;
  position: relative !important;
}

/* Also push back the form header */
body.modal-open .modern-form-header {
  position: relative !important;
  z-index: 1 !important;
}

/* Keep body scroll locked when modal is open */
body.modal-open {
  overflow: hidden !important;
}

/* Ensure lookup buttons remain visible in normal state */
.lookup-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  padding: 4px;
  z-index: 10;
}

/* But push them back when modal is open */
body.modal-open .lookup-btn {
  z-index: 1 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .phone-input-group {
    flex-direction: column;
  }

  .country-code-select {
    width: 100%;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .modern-form-content {
    padding: 20px;
  }

  .modern-form-header {
    padding: 20px;
  }

  .modern-form-title {
    font-size: 24px;
  }
}
