/* Feedback Form CSS - Fixed button width */
.feedback-footer {
  position: relative;
  width: 100%;
  margin-top: auto;
}

.main-footer {
  background-color: transparent;
  padding: 0.1rem 0.5rem;
  max-width: 100%;
  z-index: 10;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none; /* Allow clicks to pass through the footer */
}

.main-footer .row {
  pointer-events: none; /* Allow clicks to pass through the row */
}

.main-footer .col-md-2 {
  pointer-events: auto; /* Re-enable clicks only for the button column */
  max-width: 150px; /* Limit the column width */
  width: auto; /* Don't take full column width */
}

.footer-content {
  display: inline;
  justify-content: flex-start; /* Align to left instead of space-between */
  align-items: center;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-text {
  font-size: 1rem;
}

.footer-text a {
  color: white;
  text-decoration: underline;
  font-size: 1rem;
}

.feedback-button {
  white-space: nowrap;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--vff-link-color);
  font-family: 'WCMano' !important;
  font-size: 1rem;
  padding: 0.3rem 0.6rem 0.2rem 0.6rem;
  margin-bottom: 0.2rem;
  width: auto; /* Don't stretch to full width */
  max-width: 140px; /* Limit button width */
}

.feedback-form-container {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  background-color: var(--light-color, #f8f9fa);
  border-top: 1px solid var(--border-color, #dee2e6);
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
  z-index: 9;
  animation: slideUp 0.3s ease-in-out forwards;
}

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

.feedback-form-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.feedback-footer.expanded::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 8;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.success-message, .error-message {
  text-align: center;
  padding: 30px 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.success-message h3 {
  color: var(--success-color, #28a745);
}

.error-message h3 {
  color: var(--danger-color, #dc3545);
}

.feedback-form-container .f-form {
  box-shadow: none;
  max-width: 100%;
}

.feedback-form-container .f-section {
  padding: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .feedback-form-inner {
    padding: 15px;
  }
  
  .feedback-form-container {
    bottom: 80px;
    max-height: 70vh;
  }
  
  .main-footer .col-md-2 {
    max-width: 120px; /* Smaller on mobile */
  }
  
  .feedback-button {
    max-width: 110px; /* Smaller button on mobile */
    font-size: 0.9rem;
  }
}

/* Fixed Adaptive Feedback Form CSS - Works for both light and dark modes */

/* Default (Light Mode) Styles */
.feedback-form-container {
  background-color: #f8f9fa; /* Light background fallback */
  color: #212529; /* Dark text fallback */
  border-top: 1px solid #dee2e6;
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
  z-index: 9;
  animation: slideUp 0.3s ease-in-out forwards;
}

/* Vue Flow Form light mode defaults */
.feedback-form-container .vff,
.feedback-form-container .f-form {
  background-color: transparent !important;
  color: #212529 !important;
}

.feedback-form-container .f-section {
  background-color: transparent !important;
  color: #212529 !important;
}

.feedback-form-container .f-section .f-section-wrap .f-section-question,
.feedback-form-container .field-questionmark h2,
.feedback-form-container .field-questionmark .f-section-text,
.feedback-form-container .f-section .f-section-wrap .f-section-text {
  color: #212529 !important;
}

/* Input fields - light mode */
.feedback-form-container input[type="text"],
.feedback-form-container textarea,
.feedback-form-container .f-string-field,
.feedback-form-container .f-text-field {
  background-color: #ffffff !important;
  border: 1px solid #ced4da !important;
  color: #212529 !important;
}

.feedback-form-container input[type="text"]:focus,
.feedback-form-container textarea:focus,
.feedback-form-container .f-string-field:focus,
.feedback-form-container .f-text-field:focus {
  background-color: #ffffff !important;
  border-color: #0d6efd !important;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

.feedback-form-container input::placeholder,
.feedback-form-container textarea::placeholder {
  color: #6c757d !important;
  opacity: 0.7;
}

/* Multiple choice options - light mode */
.feedback-form-container .f-radios-wrap .f-option,
.feedback-form-container .f-checkboxes-wrap .f-option {
  background-color: #ffffff !important;
  border: 1px solid #ced4da !important;
  color: #212529 !important;
}

.feedback-form-container .f-radios-wrap .f-option:hover,
.feedback-form-container .f-checkboxes-wrap .f-option:hover {
  background-color: #f8f9fa !important;
}

.feedback-form-container .f-radios-wrap .f-option.f-selected,
.feedback-form-container .f-checkboxes-wrap .f-option.f-selected {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
  color: white !important;
}

/* Navigation buttons - light mode */
.feedback-form-container .f-nav .f-prev,
.feedback-form-container .f-nav .f-next {
  background-color: #6c757d !important;
  border: 1px solid #6c757d !important;
  color: white !important;
}

.feedback-form-container .f-nav .f-prev:hover,
.feedback-form-container .f-nav .f-next:hover {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
}

/* Submit button - light mode */
.feedback-form-container .f-submit .o-btn-action {
  background-color: #0d6efd !important;
  border: 1px solid #0d6efd !important;
  color: white !important;
}

.feedback-form-container .f-submit .o-btn-action:hover {
  background-color: #0b5ed7 !important;
  border-color: #0b5ed7 !important;
}

/* Help text - light mode */
.feedback-form-container .f-help,
.feedback-form-container .f-sub,
.feedback-form-container .f-section-text {
  color: #6c757d !important;
}

/* Success/Error messages - light mode */
.success-message, .error-message {
  background-color: #ffffff !important;
  color: #212529 !important;
  border: 1px solid #dee2e6;
  text-align: center;
  padding: 30px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.success-message h3 {
  color: #28a745 !important;
}

.error-message h3 {
  color: #dc3545 !important;
}

.success-message .btn,
.error-message .btn {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
  color: white !important;
}

.success-message .btn:hover,
.error-message .btn:hover {
  background-color: #0b5ed7 !important;
  border-color: #0b5ed7 !important;
}

/* Dark Mode Overrides - Only apply when system is in dark mode */
@media (prefers-color-scheme: dark) {
  .feedback-form-container {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
    border-top: 1px solid #6c757d !important;
  }
  
  .feedback-form-container .vff,
  .feedback-form-container .f-form {
    color: #f8f9fa !important;
  }
  
  .feedback-form-container .f-section {
    color: #f8f9fa !important;
  }
  
  .feedback-form-container .f-section .f-section-wrap .f-section-question,
  .feedback-form-container .field-questionmark h2,
  .feedback-form-container .field-questionmark .f-section-text,
  .feedback-form-container .f-section .f-section-wrap .f-section-text {
    color: #f8f9fa !important;
  }
  
  .feedback-form-container input[type="text"],
  .feedback-form-container textarea,
  .feedback-form-container .f-string-field,
  .feedback-form-container .f-text-field {
    background-color: #6c757d !important;
    border: 1px solid #6c757d !important;
    color: #f8f9fa !important;
  }
  
  .feedback-form-container input[type="text"]:focus,
  .feedback-form-container textarea:focus,
  .feedback-form-container .f-string-field:focus,
  .feedback-form-container .f-text-field:focus {
    background-color: #495057 !important;
    border-color: #0d6efd !important;
  }
  
  .feedback-form-container input::placeholder,
  .feedback-form-container textarea::placeholder {
    color: #adb5bd !important;
  }
  
  .feedback-form-container .f-radios-wrap .f-option,
  .feedback-form-container .f-checkboxes-wrap .f-option {
    background-color: transparent !important;
    border: 1px solid #6c757d !important;
    color: #f8f9fa !important;
  }
  
  .feedback-form-container .f-radios-wrap .f-option:hover,
  .feedback-form-container .f-checkboxes-wrap .f-option:hover {
    background-color: #6c757d !important;
  }
  
  .feedback-form-container .f-nav .f-prev,
  .feedback-form-container .f-nav .f-next {
    background-color: #6c757d !important;
    border: 1px solid #6c757d !important;
    color: #f8f9fa !important;
  }
  
  .feedback-form-container .f-help,
  .feedback-form-container .f-sub,
  .feedback-form-container .f-section-text {
    color: #adb5bd !important;
  }
  
  .success-message, .error-message {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
    border: 1px solid #6c757d !important;
  }
  
  .feedback-footer.expanded::before {
    background-color: rgba(0, 0, 0, 0.5) !important;
  }
}

/* Form inner container */
.feedback-form-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Animation */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Backdrop */
.feedback-footer.expanded::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 8;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .feedback-form-inner {
    padding: 15px;
  }
  
  .feedback-form-container {
    bottom: 80px;
    max-height: 70vh;
  }
}