/* Estilos principales para Bike Orange Tour */
:root {
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --success-color: #22c55e;
  --error-color: #ef4444;
  --info-color: #3b82f6;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fff8f1;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* Header y Navegación */
header {
  background: linear-gradient(90deg, var(--orange-400), var(--orange-500), var(--orange-600));
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  header {
    justify-content: space-around;
  }
}

header h1 {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  letter-spacing: 1px;
  margin: 0;
}

nav.desktop-menu {
  display: none;
}

@media (min-width: 768px) {
  nav.desktop-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
  }
}

nav a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ffe0cc;
}

button.nav-btn {
  padding: 0.5rem 1rem;
  background-color: var(--orange-500);
  color: white;
  border: none;
  border-radius: 0.375rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button.nav-btn:hover {
  background-color: var(--orange-600);
}

#nav-toggle {
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  #nav-toggle {
    display: none;
  }
}

#mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, var(--orange-400), var(--orange-500), var(--orange-600));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  gap: 1rem;
  z-index: 100;
}

.hidden {
  display: none !important;
}

/* Main Content */
main {
  flex-grow: 1;
  padding: 1.5rem;
  background-color: #fff8f1;
}

section {
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--orange-600);
  margin-bottom: 1rem;
}

/* Font Size Controls */
.font-controls {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 40;
}

.font-btn {
  padding: 0.5rem;
  background-color: var(--orange-400);
  color: white;
  border: none;
  border-radius: 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.font-btn:hover {
  background-color: var(--orange-500);
}

/* Map */
#map-user {
  width: 100%;
  height: 20rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 4px solid var(--orange-500);
  transition: border-color 0.3s ease;
  background-position: center;
  background-size: cover;
}

#map-user:hover {
  border-color: var(--orange-600);
}

/* Route Cards */
.route-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .route-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .route-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.route-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.route-card:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(249, 115, 22, 0.2);
}

.route-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--orange-600);
  margin-bottom: 0.5rem;
}

.route-card p {
  color: #4b5563;
  margin: 0.25rem 0;
}

/* Admin Section */
.admin-table {
  min-width: 100%;
  background-color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  overflow: hidden;
}

.admin-table thead {
  background-color: var(--orange-500);
  color: white;
}

.admin-table th,
.admin-table td {
  padding: 0.5rem 1rem;
  text-align: left;
}

.admin-table tr:nth-child(even) {
  background-color: #f9fafb;
}

.edit-btn {
  background-color: #eab308;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.edit-btn:hover {
  background-color: #ca8a04;
}

.delete-btn {
  background-color: #ef4444;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  margin-left: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.delete-btn:hover {
  background-color: #dc2626;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.modal:not(.hidden) {
  opacity: 1;
}

.modal-content {
  background-color: white;
  padding: 1.5rem 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  width: 24rem;
  max-width: 90%;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1051;
}

.modal:not(.hidden) .modal-content {
  transform: translateY(0);
}

.modal h3 {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--orange-600);
  margin-bottom: 1rem;
}

.modal input {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.modal .btn-group {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.cancel-btn {
  padding: 0.5rem 1rem;
  background-color: #d1d5db;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cancel-btn:hover {
  background-color: #9ca3af;
}

.save-btn {
  padding: 0.5rem 1rem;
  background-color: #22c55e;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.save-btn:hover {
  background-color: #16a34a;
}

.btn-close {
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: #6b7280;
  transition: color 0.2s ease;
}

.btn-close:hover {
  color: #111827;
}

/* Delete Confirmation Modal */
.delete-modal .modal-content {
  text-align: center;
}

.delete-modal p {
  margin-bottom: 1.5rem;
}

.delete-modal button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  margin: 0 0.5rem;
  transition: background-color 0.2s ease;
}

.delete-modal .confirm-btn {
  background-color: #ef4444;
  color: white;
}

.delete-modal .confirm-btn:hover {
  background-color: #dc2626;
}

.delete-modal .cancel-btn {
  background-color: #d1d5db;
}

.delete-modal .cancel-btn:hover {
  background-color: #9ca3af;
}

/* Footer */
footer {
  background: linear-gradient(90deg, var(--orange-400), var(--orange-500), var(--orange-600));
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: white;
}

/* Toast Notifications */
.app-toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: white;
  color: #333;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  min-width: 200px;
  max-width: 80%;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.app-toast-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.app-toast-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-toast-success {
  border-left: 4px solid var(--success-color);
}

.app-toast-error {
  border-left: 4px solid var(--error-color);
}

.app-toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  margin-left: 0.5rem;
}

.app-toast-close:hover {
  color: #111827;
}

@media (min-width: 768px) {
  .app-toast {
    bottom: 2rem;
    min-width: 300px;
  }
}

/* Animaciones y transiciones */
.btn {
  transition: all 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

input:focus, 
button:focus {
  outline: 2px solid var(--orange-400);
  outline-offset: 1px;
}

/* Ajustes de accesibilidad */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
} 