/* Custom styles for eVIN application */

/* Fix dropdown menu alignment - make it appear below the button instead of to the left */
details.dropdown[open] > ul {
  position: absolute;
  right: 0;
  left: auto;
  transform: none;
  margin-top: 0.5rem;
}

/* Ensure dropdown container has proper positioning context */
details.dropdown {
  position: relative;
}

/* Language switcher styles */
nav ul li details.dropdown {
  display: inline-block;
  margin: 0;
}

/* Ensure dropdowns in nav are properly aligned */
nav ul {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Make dropdown summaries more compact in navigation */
nav details.dropdown summary {
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

/* Improve dropdown menu styling */
details.dropdown ul {
  min-width: 150px;
  z-index: 1000;
}

details.dropdown ul li a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

details.dropdown ul li a:hover {
  background-color: var(--primary-hover);
}

/* Floating save button for forms */
.floating-save-button {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 200px; /* Tamaño fijo para que coincida con cancelar */
  transition: all 0.3s ease;
}

.floating-save-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Floating cancel button for forms - positioned below save button */
.floating-cancel-button {
  position: fixed;
  bottom: 6rem; /* Positioned above the save button */
  right: 2rem;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 200px; /* Mismo tamaño que save button */
  transition: all 0.3s ease;
  background-color: #d32f2f !important;
  border-color: #d32f2f !important;
  color: white !important;
}

.floating-cancel-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  background-color: #b71c1c !important;
  border-color: #b71c1c !important;
}

.terms {
  margin-top: 1.5rem;
}

:root {
  --color-success: #2e7d32;
  --color-error: #d41f30;
}

@media (max-width: 768px) {
  .floating-save-button {
    bottom: 1rem;
    right: 1rem;
    width: 150px;
  }
  
  .floating-cancel-button {
    bottom: 5rem; /* Adjusted for mobile */
    right: 1rem;
    width: 150px;
  }
}

/* Modal de carga (generación de PDF / descarga) */
.modal-loading {
  max-width: 480px;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-loading p {
  margin: 0;
  text-align: center;
}
