/* Patient Eligibility Wizard - Material Design Styles */

.eligibility-wizard-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Wizard Header */
.wizard-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.wizard-title {
  font-size: 28px;
  font-weight: 300;
  color: #333;
  margin-bottom: 30px;
}

.wizard-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.step-indicator.active .step-number {
  background: #2196f3;
  color: white;
}

.step-indicator.completed .step-number {
  background: #4caf50;
  color: white;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.step-indicator.active .step-label {
  color: #2196f3;
}

/* Wizard Content */
.wizard-content {
  position: relative;
}

.wizard-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.wizard-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-header {
  margin-bottom: 30px;
  text-align: center;
}

.step-header h3 {
  font-size: 24px;
  font-weight: 400;
  color: #333;
  margin-bottom: 10px;
}

.step-header p {
  color: #666;
  font-size: 16px;
}

/* Eligibility Badge */
.eligibility-badge {
  display: inline-flex;
  align-items: center;
  background: #4caf50;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  margin: 10px 0;
  font-size: 14px;
  font-weight: 500;
}

.badge-icon {
  margin-right: 8px;
  font-size: 16px;
}

/* Material Form Styles */
.material-form {
  max-width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  position: relative;
  margin-bottom: 20px;
}

.form-group label {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 16px;
  color: #666;
  pointer-events: none;
  transition: all 0.3s ease;
  transform: translateY(20px);
}

.form-group input:focus ~ label,
.date-input label,
.select-type label,
.payer-search-wrapper label,

.form-group select:focus ~ label,
.form-group select:not([value='']) ~ label,
.form-group input.has-value ~ label,
.form-group select.has-value ~ label {
  transform: translateY(-10px) scale(0.8);
  color: #2196f3;
}


.form-group input,
.form-group select {
  width: 100%;
  padding: 20px 0 10px 0;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  background: transparent;
  font-size: 16px;
  color: #333;
  transition: all 0.3s ease;
}
.payer-search-wrapper .select2-container--default .select2-selection--single{
  width: 100%;
  padding: 11px 0 10px 0;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  background: transparent;
  font-size: 16px;
  color: #333;
  transition: all 0.3s ease;
  height: unset;
  border-radius: 0;
}
.form-group.readonly label{
  transform: translateY(-18px) scale(0.8);
  color: #2196f3;
}
.form-group.readonly input,
.form-group.readonly  select {
  padding: 16px 0 10px 0;
  padding-left: 10px;
}
.form-group input:focus,
.form-group select:focus {
  outline: none !important;
  border-bottom-color: #2196f3;
}

.form-group input[readonly] {
  background: #f5f5f5;
  color: #666;
  cursor: not-allowed;
}

.material-focus {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #2196f3;
  transition: width 0.3s ease;
}

.form-group input:focus ~ .material-focus,
.form-group select:focus ~ .material-focus {
  width: 100%;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__clear {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Insurance Section */
.insurance-section {
  margin: 30px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
}

.insurance-section h4 {
  margin: 0 0 20px 0;
  color: #333;
  font-weight: 500;
}

.insurance-group {
  margin-bottom: 20px;
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-width: 120px;
  justify-content: center;
}

.btn-primary {
  background: #2196f3;
  color: white;
}

.btn-primary:hover {
  background: #1976d2;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-secondary {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Result Messages */
.result-message {
  margin-top: 20px;
  padding: 16px;
  border-radius: 4px;
  font-weight: 500;
}

.result-message.success {
  background: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #4caf50;
}

.result-message.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #f44336;
}

/* reCAPTCHA */
.g-recaptcha {
  margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .eligibility-wizard-container {
    padding: 15px;
    margin: 10px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .wizard-steps {
    gap: 20px;
  }

  .form-actions {
    flex-direction: column;
    gap: 15px;
  }

  .btn {
    width: 100%;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Focus States for Accessibility */
.btn:focus,
.form-group input:focus,
.form-group select:focus {
  outline: 2px solid #2196f3;
  outline-offset: 2px;
}

/* Error States */
.form-group.error input,
.form-group.error select {
  border-bottom-color: #f44336;
}

.form-group.error label {
  color: #f44336;
}


/* Enhanced Error Message */
.error-message {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  border: 2px solid #f44336;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.15);
}

.error-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: #f44336;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.error-content h3 {
  margin: 0 0 10px 0;
  color: #c62828;
  font-size: 20px;
  font-weight: 600;
}

.error-content p {
  margin: 5px 0;
  color: #d32f2f;
  font-size: 14px;
  line-height: 1.5;
}

.error-content strong {
  color: #b71c1c;
  font-weight: 600;
  background: rgba(244, 67, 54, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Date input specific styles */
.form-group.date-input input[type='date'] {
  cursor: pointer;
  position: relative;
}

.form-group.date-input input[type='date']::-webkit-calendar-picker-indicator {
  background: transparent;
  bottom: 0;
  color: transparent;
  cursor: pointer;
  height: auto;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: auto;
}

.form-group.date-input input[type='date']::-webkit-inner-spin-button,
.form-group.date-input input[type='date']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-group.date-input input[type='date']::-webkit-datetime-edit {
  padding: 0;
}

.form-group.date-input
  input[type='date']::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.form-group.date-input input[type='date']::-webkit-datetime-edit-text {
  padding: 0 2px;
}

.form-group.date-input input[type='date']::-webkit-datetime-edit-month-field,
.form-group.date-input input[type='date']::-webkit-datetime-edit-day-field,
.form-group.date-input input[type='date']::-webkit-datetime-edit-year-field {
  padding: 0 2px;
}

/* Ensure date input is properly clickable */
.form-group.date-input input[type='date'] {
  cursor: pointer !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-group.date-input input[type='date']:focus {
  cursor: pointer !important;
}

/* Add a subtle calendar icon for better UX */
.form-group.date-input::after {
  content: '📅';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 16px;
  opacity: 0.6;
  z-index: 1;
}

.form-group.date-input.focused::after {
  opacity: 1;
  color: #2196f3;
}


.form-group.readonly input,
.form-group.readonly select {
  background: #f5f5f5;
  color: #666;
  cursor: not-allowed;
}

.form-group.readonly label {
  color: #666;
}

/* Payer search wrapper specific styling */
.form-group.payer-search-wrapper {
  position: relative;
}

.form-group.payer-search-wrapper label {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 16px;
  color: #666;
  pointer-events: none;
  transition: all 0.3s ease;
  transform: translateY(-10px) scale(0.8);
  color: #2196f3;
}
/**Handle error**/
/* Valid States */
.form-group.valid input,
.form-group.valid select {
  border-bottom-color: #4caf50;
}

.form-group.valid label {
  color: #4caf50;
}

/* Validation feedback icons */
.form-group.valid::after {
  content: '✓';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #4caf50;
  font-weight: bold;
  font-size: 16px;
  pointer-events: none;
}

.form-group.error::after {
  content: '✗';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #f44336;
  font-weight: bold;
  font-size: 16px;
  pointer-events: none;
}

/* Enhanced Success Message */
.success-message {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
  border: 2px solid #4caf50;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.success-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: #4caf50;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.success-content h3 {
  margin: 0 0 10px 0;
  color: #2e7d32;
  font-size: 20px;
  font-weight: 600;
}

.success-content p {
  margin: 5px 0;
  color: #388e3c;
  font-size: 14px;
  line-height: 1.5;
}

.success-content strong {
  color: #1b5e20;
  font-weight: 600;
  background: rgba(76, 175, 80, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Enhanced Date Input Styling */
.form-group.date-input {
  position: relative;
}

.form-group.date-input input[type='text'] {
  padding-right: 50px;
  cursor: text;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group.date-input input[type='text']:focus {
  border-color: #2196f3;
}

.form-group.date-input input[type='text']:hover {
  border-color: #1976d2;
}

/* Copy/paste visual feedback */
.form-group.date-input input[type='text']:active {
  background-color: rgba(33, 150, 243, 0.05);
}

.form-group.date-input input[type='text']::selection {
  background-color: rgba(33, 150, 243, 0.3);
}

.date-picker-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.3s ease;
  z-index: 2;
}

.date-picker-btn:hover {
  background: rgba(33, 150, 243, 0.1);
}

.date-picker-btn:active {
  background: rgba(33, 150, 243, 0.2);
}

.calendar-icon {
  font-size: 18px;
  color: #666;
  transition: color 0.3s ease;
}

.date-picker-btn:hover .calendar-icon {
  color: #2196f3;
}

/* Date input placeholder styling */
.form-group.date-input input[type='text']::placeholder {
  color: #999;
  font-size: 14px;
  font-style: italic;
}

/* Date input validation states */
.form-group.date-input.valid input[type='text'] {
  border-color: #4caf50;
}

.form-group.date-input.error input[type='text'] {
  border-color: #f44336;
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

/* Readonly date input styling */
.form-group.date-input.readonly input[type='text'] {
  background-color: #f5f5f5;
  color: #666;
  cursor: not-allowed;
}

.form-group.date-input.readonly .date-picker-btn {
  display: none;
}



.form-group.date-input:hover::after {
  opacity: 1;
}

/* Flatpickr Date Picker Styling */
.flatpickr-calendar {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0e0e0;
  font-family: inherit;
}

.flatpickr-months {
  background: #2196f3;
  border-radius: 8px 8px 0 0;
  color: white;
}

.flatpickr-month {
  color: white;
}

.flatpickr-current-month {
  padding: 0 0;
  color: #fff;
}
.flatpickr-months .flatpickr-prev-month svg {
  color: #fff;
}
.flatpickr-monthDropdown-months {
  background: transparent;
  color: white;
  border: none;
}

.flatpickr-monthDropdown-months option {
  background: #2196f3;
  color: #000;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  color: white;
  fill: white;
  padding: 10px;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.flatpickr-weekdays {
  background: #f5f5f5;
}

.flatpickr-weekday {
  color: #666;
  font-weight: 600;
  padding: 8px 0;
}

.flatpickr-days {
  padding: 8px;
}

.flatpickr-day {
  border-radius: 4px;
  margin: 2px;
  color: #333;
}

.flatpickr-day:hover {
  background: #e3f2fd;
  color: #1976d2;
}

.flatpickr-day.selected {
  background: #2196f3;
  color: white;
  border-color: #2196f3;
}

.flatpickr-day.today {
  background: #ff9800;
  color: white;
  border-color: #ff9800;
}

.flatpickr-day.disabled {
  color: #ccc;
  background: transparent;
}

.flatpickr-day.disabled:hover {
  background: transparent;
  color: #ccc;
}

/* Date input with Flatpickr */
.form-group.date-input input[type='text'] {
  padding-right: 50px;
  cursor: text;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group.date-input input[type='text']:focus {
  border-color: #2196f3;
}

.date-picker-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.3s ease;
  z-index: 2;
}

.date-picker-btn:hover {
  background: rgba(33, 150, 243, 0.1);
}

.calendar-icon {
  font-size: 18px;
  color: #666;
  transition: color 0.3s ease;
}

.date-picker-btn:hover .calendar-icon {
  color: #2196f3;
}