/* GuardpotTour Component Styles */

/* Main Preview Container */
.guardpot-preview-container {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #0b0d10;
  border-radius: 10px;
  overflow: hidden;
}

.guardpot-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.guardpot-preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.guardpot-start-button {
  padding: 16px 40px;
  background-color: #b02f34;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.guardpot-start-button:hover {
  background-color: #c0353a;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(176, 47, 52, 0.3);
}

/* Modal */
.guardpot-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #0f0f12;
  z-index: 1000;
  animation: guardpotModalBackdropFadeIn 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
  overflow: hidden;
}

.guardpot-modal-backdrop.closing {
  animation: guardpotModalBackdropFadeOut 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.guardpot-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #0b0d10;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
  animation: guardpotModalContentSlideIn 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.guardpot-modal-content.closing {
  animation: guardpotModalContentSlideOut 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.guardpot-modal-image-wrapper {
  position: relative;
  max-width: 95vw;
  max-height: calc(100vh - 100px);
  width: auto;
  height: auto;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guardpot-modal-image {
  width: auto;
  height: auto;
  max-width: 95vw;
  max-height: calc(100vh - 100px);
  object-fit: contain;
  display: block;
}

/* Overlay System */
.guardpot-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transition: all 500ms ease-in-out;
  opacity: 1;
}

.guardpot-overlay-left {
  position: absolute;
  left: 0;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transition: all 500ms ease-in-out;
  opacity: 1;
}

.guardpot-overlay-right {
  position: absolute;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transition: all 500ms ease-in-out;
  opacity: 1;
}

.guardpot-overlay-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transition: all 500ms ease-in-out;
  opacity: 1;
}

.guardpot-overlay-transitioning {
  opacity: 0.5;
}

/* Highlight Border */
.guardpot-highlight-border {
  position: absolute;
  border: 2px solid #b02f34;
  border-radius: 10px;
  pointer-events: none;
  transition: all 500ms ease-in-out;
  box-shadow: 0 0 0 2px rgba(176, 47, 52, 0.3), 0 0 15px rgba(176, 47, 52, 0.2);
  opacity: 1;
  transform: scale(1);
}

.guardpot-highlight-border.transitioning {
  opacity: 0.5;
  transform: scale(0.98);
}

/* Step Info Popup */
.guardpot-step-info-popup {
  position: absolute;
  background-color: #111319;
  border: 1px solid #262a33;
  border-radius: 12px;
  padding: 20px;
  color: #f1f2f5;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(176, 47, 52, 0.3);
  min-width: 300px;
  max-width: 400px;
  transition: all 500ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0) scale(1);
}

.guardpot-step-info-popup.transitioning {
  opacity: 0.7;
  transform: translateY(-10px) scale(0.95);
}

.guardpot-step-info-popup.closing {
  opacity: 0;
  transform: translateY(20px) scale(0.8);
}

/* Popup Animated Border */
.guardpot-popup-animated-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  border: 2px solid transparent;
  background: linear-gradient(45deg, rgba(176, 47, 52, 0.3), rgba(176, 47, 52, 0.1));
  background-clip: border-box;
  animation: guardpotPulseGlow 2s infinite;
  pointer-events: none;
}

/* Quit Button */
.guardpot-quit-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #262a33;
  border-radius: 50%;
  color: #b9bfca;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: normal;
  line-height: 1;
  z-index: 20;
  transition: all 200ms ease;
}

.guardpot-quit-button:hover {
  background: rgba(176, 47, 52, 0.8);
  color: white;
  transform: scale(1.1);
}

/* Popup Content */
.guardpot-popup-content {
  position: relative;
  z-index: 10;
}

.guardpot-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.guardpot-step-counter {
  background-color: #b02f34;
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.guardpot-popup-title {
  margin: 0;
  font-weight: 600;
  font-size: 1.1rem;
}

.guardpot-popup-description {
  margin: 0 0 16px 0;
  color: #b9bfca;
  line-height: 1.5;
}

.guardpot-popup-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.guardpot-nav-button {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #2a2f39;
  background-color: #171a21;
  color: #f1f2f5;
  cursor: pointer;
  font-size: 14px;
  transition: all 200ms ease;
}

.guardpot-nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.guardpot-nav-button:hover:not(:disabled) {
  background-color: #1a1d25;
  border-color: #3a3f49;
}

.guardpot-nav-button.primary {
  border-color: #8e262a;
  background-color: #b02f34;
  color: white;
}

.guardpot-nav-button.primary:hover {
  background-color: #c0353a;
}

.guardpot-step-dots-container {
  display: flex;
  gap: 6px;
}

.guardpot-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #2a2f39;
  border: none;
  cursor: pointer;
  transition: all 300ms ease;
  transform: scale(1);
}

.guardpot-step-dot.active {
  background-color: #b02f34;
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(176, 47, 52, 0.4);
}

.guardpot-step-dot:hover:not(.active) {
  background-color: #3a3f49;
}

/* Progress Bar */
.guardpot-tour-progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 2px;
  z-index: 1002;
  backdrop-filter: blur(10px);
  animation: guardpotProgressBarFadeIn 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.guardpot-tour-progress-bar.closing {
  animation: guardpotProgressBarFadeOut 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.guardpot-progress-segment {
  flex: 1;
  position: relative;
  cursor: pointer;
  overflow: visible;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  background-color: rgba(255, 255, 255, 0.1);
}

.guardpot-progress-segment:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.guardpot-progress-segment-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #b02f34 0%, #d24449 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.guardpot-progress-segment.completed .guardpot-progress-segment-fill {
  transform: scaleX(1);
}

.guardpot-progress-segment.active {
  background-color: rgba(176, 47, 52, 0.2);
}

.guardpot-progress-segment.active .guardpot-progress-segment-fill {
  transform: scaleX(1);
  animation: guardpotProgressPulse 2s infinite;
}

.guardpot-progress-step-number {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #2a2f39;
  border: 2px solid #262a33;
  color: #b9bfca;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1003;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.guardpot-progress-segment:hover .guardpot-progress-step-number {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.guardpot-progress-step-number.completed {
  background-color: #b02f34;
  border-color: #8e262a;
  color: white;
  box-shadow: 0 2px 8px rgba(176, 47, 52, 0.4);
}

.guardpot-progress-step-number.active {
  background: linear-gradient(135deg, #b02f34 0%, #d24449 100%);
  border-color: #d24449;
  color: white;
  box-shadow: 0 4px 16px rgba(176, 47, 52, 0.6);
  animation: guardpotStepNumberPulse 2s infinite;
}

@keyframes guardpotProgressPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes guardpotStepNumberPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 4px 16px rgba(176, 47, 52, 0.6);
  }
  50% {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(176, 47, 52, 0.8);
  }
}

@keyframes guardpotProgressBarFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes guardpotProgressBarFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Animations */
@keyframes guardpotPulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(176, 47, 52, 0.4); }
  50% { box-shadow: 0 0 8px 4px rgba(176, 47, 52, 0.6); }
  100% { box-shadow: 0 0 0 0 rgba(176, 47, 52, 0.4); }
}

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

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

@keyframes guardpotModalContentSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes guardpotModalContentSlideOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .guardpot-preview-container {
    aspect-ratio: 4 / 3;
  }
  
  .guardpot-start-button {
    padding: 14px 36px;
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .guardpot-preview-container {
    aspect-ratio: 3 / 2;
  }
  
  .guardpot-start-button {
    padding: 12px 32px;
    font-size: 1rem;
  }
  
  .guardpot-step-info-popup {
    min-width: 280px;
    max-width: 320px;
    padding: 16px;
  }
  
  .guardpot-popup-navigation {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .guardpot-step-dots-container {
    order: -1;
    width: 100%;
    justify-content: center;
  }
}

/* Guardpot Step Popup - Animated */
.guardpot-step-popup {
  position: absolute;
  background-color: #111319;
  border: 1px solid #262a33;
  border-radius: 12px;
  padding: 20px;
  color: #f1f2f5;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(176, 47, 52, 0.3);
  min-width: 300px;
  max-width: 400px;
  animation: guardpotPopupSlideIn 600ms ease-out forwards;
  transition: all 500ms ease-in-out;
}

.guardpot-step-popup.transitioning {
  opacity: 0.3;
  transition: all 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.guardpot-step-popup.transitioning.transition-next {
  transform: translateX(80px) scale(0.95);
}

.guardpot-step-popup.transitioning.transition-prev {
  transform: translateX(-80px) scale(0.95);
}

.guardpot-step-popup.closing {
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Popup Animated Border */
.guardpot-popup-animated-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  border: 2px solid transparent;
  background: linear-gradient(45deg, rgba(176, 47, 52, 0.3), rgba(176, 47, 52, 0.1));
  background-clip: border-box;
  animation: pulseGlow 2s infinite;
  transition: all 400ms ease-in-out;
  pointer-events: none;
}

/* Quit Button */
.guardpot-quit-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #262a33;
  border-radius: 50%;
  color: #b9bfca;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: normal;
  line-height: 1;
  z-index: 20;
  transition: all 200ms ease;
}

.guardpot-quit-button:hover {
  background: rgba(176, 47, 52, 0.8);
  color: white;
  transform: scale(1.1);
}

/* Popup Content */
.guardpot-popup-content {
  position: relative;
  z-index: 10;
  transition: all 400ms ease-in-out;
}

/* Animations */
@keyframes guardpotPopupSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(176, 47, 52, 0.4); }
  50% { box-shadow: 0 0 8px 4px rgba(176, 47, 52, 0.6); }
  100% { box-shadow: 0 0 0 0 rgba(176, 47, 52, 0.4); }
}

