/* Estilos específicos para o Tour Virtual 360° */

/* Loading Spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #3b82f6;
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Hotspots */
.hotspot-info {
  width: 20px;
  height: 20px;
  background: #3b82f6;
  border: 3px solid white;
  border-radius: 50%;
  cursor: pointer;
  animation: pulse 2s infinite;
  position: relative;
}

.hotspot-navigation {
  width: 24px;
  height: 24px;
  background: #10b981;
  border: 3px solid white;
  border-radius: 50%;
  cursor: pointer;
  animation: pulse 2s infinite;
  position: relative;
}

.hotspot-navigation::before {
  content: "→";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 12px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.hotspot-navigation {
  animation-name: pulse-green;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Tooltip dos Hotspots */
.hotspot-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hotspot-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

.hotspot-info:hover .hotspot-tooltip,
.hotspot-navigation:hover .hotspot-tooltip {
  opacity: 1;
}

/* Controles customizados */
.tour-controls {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Pannellum customizations */
.pnlm-container {
  font-family: inherit !important;
}

.pnlm-load-button {
  background: #3b82f6 !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 12px 24px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
}

.pnlm-load-button:hover {
  background: #1d4ed8 !important;
  transform: translateY(-2px) !important;
}

.pnlm-load-box {
  background: rgba(0, 0, 0, 0.8) !important;
  border-radius: 12px !important;
  padding: 40px !important;
}

.pnlm-lbox h2 {
  color: white !important;
  font-size: 24px !important;
  margin-bottom: 16px !important;
}

.pnlm-lbox p {
  color: #d1d5db !important;
  font-size: 16px !important;
  margin-bottom: 24px !important;
}

/* Compass customization */
.pnlm-compass {
  background: rgba(0, 0, 0, 0.5) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 50% !important;
}

/* Error messages */
.pnlm-error-msg {
  background: rgba(239, 68, 68, 0.9) !important;
  color: white !important;
  border-radius: 8px !important;
  padding: 16px !important;
  font-size: 16px !important;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .absolute.left-6 {
    left: 1rem;
    width: 200px;
  }

  .absolute.top-20.right-6 {
    right: 1rem;
    width: 280px;
  }

  .tour-controls {
    padding: 12px 16px;
    gap: 12px;
  }

  .tour-controls button {
    padding: 8px;
  }

  .hotspot-info,
  .hotspot-navigation {
    width: 24px;
    height: 24px;
  }

  .hotspot-tooltip {
    font-size: 11px;
    padding: 6px 10px;
  }
}

@media (max-width: 640px) {
  .absolute.left-6 {
    position: fixed;
    bottom: 80px;
    left: 1rem;
    right: 1rem;
    width: auto;
    top: auto;
    transform: none;
  }

  .absolute.top-20.right-6 {
    position: fixed;
    top: 80px;
    left: 1rem;
    right: 1rem;
    width: auto;
  }

  .container.mx-auto.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  header h1 {
    font-size: 1rem;
  }

  header p {
    font-size: 0.75rem;
  }
}

/* Smooth transitions */
* {
  transition: all 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Accessibility improvements */
button:focus,
.tour-point-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .hotspot-info,
  .hotspot-navigation {
    border-width: 4px;
    border-color: white;
  }

  .hotspot-tooltip {
    background: black;
    border: 1px solid white;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .hotspot-info,
  .hotspot-navigation {
    animation: none;
  }

  .loading-spinner {
    animation: none;
    border-top-color: transparent;
    border-right-color: #3b82f6;
  }

  * {
    transition: none;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }

  .absolute,
  .fixed {
    position: static;
  }

  #panorama {
    display: none;
  }

  .no-print {
    display: none;
  }
}
