/* Main Form Styles */
.qs-quote-form-container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  background-color: #faf7f7;
  padding: 30px;
  border-radius: 48px;
}

.qs-form-wrapper h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 60px;
  color: #000;
}

.qs-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.qs-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 10px;
}

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

/* Form fields */
.qs-form input[type="text"],
.qs-form input[type="email"],
.qs-form input[type="tel"],
.qs-form input[type="number"],
.qs-form input[type="date"],
.qs-form input[type="time"],
.qs-form textarea,
.qs-form select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
  color: #333;
  background-color: #fff;
  box-sizing: border-box;
  height: 48px;
}

.qs-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
  font-size: 16px;
  font-family: "Poppins", sans-serif !important;
}

.qs-form .form-field {
  flex: 1;
  min-width: 200px;
}

.qs-form-row .mdl-textfield {
  flex: 1;
  min-width: 200px;
}

/* Journey type radio buttons */
.qs-journey-type {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.qs-radio-group {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.qs-radio-wrapper {
  display: flex;
  align-items: center;
}

.qs-radio-wrapper input[type="radio"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
}

/* Start Quote button */
.qs-button {
  display: inline-block;
  padding: 12px 25px;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.3s ease;
}

.qs-button:hover {
  background-color: #333;
}

.qs-button-secondary {
  background-color: #f0f0f0;
  color: #333;
}

.qs-button-secondary:hover {
  background-color: #e0e0e0;
}

/* Popup Styles */
.qs-popup-container {
  display: none;
  position: fixed;
  top: 0;
  right: 0; /* Position on the right side */
  width: 100%;
  max-width: 650px;
  height: 100%;
  z-index: 9999;
  overflow-y: auto;
}

.qs-popup {
  position: absolute;
  width: 90%;
   /* Narrower for sidepanel look */
  height: 100%; /* Full height */
  margin: 0; /* Remove margin */
  right: 0; /* Stick to right */
  top: 0; /* Align to top */
  background-color: #fff;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  animation: slideInRight 0.3s ease-out; /* Change animation */
  overflow-y: auto; /* Allow scrolling within the panel */
  display: flex;
  flex-direction: column; /* Stack header, content, footer */
}

.qs-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
}

.qs-popup-title {
  margin: 0;
  font-size: 22px;
  color: #000;
  font-weight: 600;
}

.qs-popup-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #777;
}

/* Adjust popup content to fill available space */
.qs-popup-content {
  padding: 30px;
  flex: 1; /* Take up available space */
  overflow-y: auto; /* Allow scrolling */
}

.qs-popup-footer {
  display: flex;
  justify-content: space-between;
  padding: 20px 30px;
  border-top: 1px solid #eee;
  background-color: #fff; /* Ensure it has a background */
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.qs-popup .mdl-card__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qs-step-title {
  background-color: #000;
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  margin-bottom: 25px;
  font-weight: 500;
  font-size: 16px;
  display: inline-block;
}

.qs-form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

/* Stop Fields */
.qs-stops-section {
  margin: 25px 0;
}

.qs-section-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 15px;
  color: #000;
}

.qs-stop-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.qs-stop-field .form-field {
  flex: 1;
}

.qs-stop-field .mdl-textfield {
  flex: 1;
}

.qs-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #000;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

.qs-button-icon.qs-remove-stop {
  background-color: #f44336;
}

.qs-button-label {
  margin-left: 10px;
  vertical-align: middle;
}

/* Thank You Step */
.qs-thank-you {
  text-align: center;
  padding: 40px 0;
}

.qs-thank-you-icon {
  font-size: 64px;
  color: #4caf50;
  margin-bottom: 20px;
}

.qs-thank-you h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #000;
}

/* Loading Spinner */
.qs-loading-spinner {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qs-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid #000;
  width: 40px;
  height: 40px;
  animation: qs-spin 1s linear infinite;
}

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

/* Date and time inputs */
.qs-form input[type="date"],
.qs-form input[type="time"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
}

.qs-form input[type="date"]::-webkit-calendar-picker-indicator,
.qs-form input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0.6;
}

/* Notification */
.qs-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 300px;
  padding: 15px 20px;
  background-color: #f8f8f8;
  border-left: 4px solid #000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  font-family: inherit;
  color: inherit;
}

.qs-notification-success {
  border-left-color: #4caf50;
}

.qs-notification-error {
  border-left-color: #f44336;
}

.qs-notification-info {
  border-left-color: #2196f3;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .qs-form-row.two-columns {
    grid-template-columns: 1fr;
  }

  .qs-popup {
    width: 100%;
    max-width: 100%;
  }

  .qs-popup-header,
  .qs-popup-content,
  .qs-popup-footer {
    padding: 15px;
  }
}

/* Date placeholder */
.qs-form input.date-placeholder::placeholder {
  color: #999;
}

/* Time placeholder */
.qs-form input.time-placeholder::placeholder {
  color: #999;
}
