/* SecureLinkTour Component Styles */

/* Main Container */
.secure-link-tour-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Preview Section */
.secure-link-preview-section {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.secure-link-preview-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.secure-link-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.secure-link-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(11, 13, 16, 0.85));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 300ms ease;
}

.secure-link-preview-overlay:hover {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(11, 13, 16, 0.75));
}

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

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

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

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

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

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

/* Overlay System */
.secure-link-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;
}

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

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

.secure-link-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;
}

.secure-link-overlay-transitioning {
  opacity: 0.3;
}

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

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

/* Progress Bar */
.secure-link-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: secureLinkProgressBarFadeIn 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.secure-link-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);
}

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

.secure-link-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);
}

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

.secure-link-progress-segment.active .secure-link-progress-segment-fill {
  transform: scaleX(1);
  animation: secureLinkProgressFillPulse 2s ease-in-out infinite;
}

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

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

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

.secure-link-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: stepNumberPulse 2s infinite;
}

/* Secure Link Step Popup - Animated */
.secure-link-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: secureLinkPopupSlideIn 600ms ease-out forwards;
  transition: all 500ms ease-in-out;
}

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

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

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

.secure-link-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 */
.secure-link-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 */
.secure-link-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;
}

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

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

/* Animations */
@keyframes secureLinkPopupSlideIn {
  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); }
}

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

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

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

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

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

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

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

@keyframes stepNumberPulse {
  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);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .secure-link-step-popup {
    min-width: 250px;
    max-width: 90vw;
    padding: 16px;
  }
  
  .secure-link-modal-content {
    padding: 5px 10px 10px 10px;
  }
  
  .secure-link-modal-image-wrapper {
    margin-top: 5px;
    max-height: calc(100vh - 60px);
  }
  
  .secure-link-modal-image {
    max-width: 98vw;
    max-height: calc(100vh - 60px);
  }
}

@media (min-width: 769px) and (max-width: 1440px) {
  .secure-link-modal-image-wrapper {
    max-height: calc(100vh - 70px);
  }
  
  .secure-link-modal-image {
    max-height: calc(100vh - 70px);
  }
}

@media (min-width: 1441px) {
  .secure-link-modal-image-wrapper {
    max-height: calc(100vh - 90px);
  }
  
  .secure-link-modal-image {
    max-height: calc(100vh - 90px);
  }
}

