/* Amoria Previous Events Styles v1.1.5 */
.amoria-previous-events-container {
  background-color: #face7c;
  position: relative;
  width: 100%; /* Made full width */
  padding-top: 30px;  
  padding-bottom: 10px; 
}

.amoria-events-slider {
  
  padding-top: 30px;
  padding-bottom: 30px;
  /* This is the viewport, similar to .elastic-container */
  overflow: hidden; /* Hide content outside the viewport */
  width: 100%;
  /* Removed scroll-behavior, scrollbar-width, -ms-overflow-style, -webkit-overflow-scrolling */
  /* Removed cursor: grab; and cursor: -webkit-grab; as per user request */
}


.amoria-prev-events-title {
  font-family: "Assistant", sans-serif;
  font-weight: 700; /* font-bold */
  font-size: 30px; /* text-lg */
  text-align: center;
  margin-bottom: 0.5rem; /* mb-2 */
}


.amoria-events-content {
  display: flex;
  flex-wrap: nowrap;         /* prevent wrapping */
  justify-content: flex-start; /* align from start, not center */
  gap: 20px;                 /* keep slide gaps */
  padding: 0 50px;           /* keep your elastic effect padding */
  transition: transform 0.5s cubic-bezier(0.25, 1.5, 0.5, 1);
  will-change: transform;
}


.amoria-event-slide {
  flex: 0 0 300px;
  height: 400px;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* Removed cursor: pointer; as per user request */

  /* Prevent text selection and dragging for all content within the slide */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-drag: none;
  -webkit-user-drag: none;
}

.amoria-event-slide:hover {
  transform: scale(1.03); /* Zoom in effect */
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.amoria-event-media-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

.amoria-event-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* Prevent image dragging (redundant with parent, but good for explicit safety) */
  user-drag: none;
  -webkit-user-drag: none;
}

/* Force portrait orientation for landscape videos */
.amoria-event-video[data-landscape="true"] {
  transform: scale(1.5);
  object-fit: cover;
}

.amoria-video-controls {
  position: absolute;
  bottom: 15px;
  right: 15px;
  display: flex;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.amoria-event-slide:hover .amoria-video-controls {
  opacity: 1;
}

.amoria-play-pause-btn,
.amoria-mute-unmute-btn {
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  cursor: pointer; /* Keep cursor pointer for buttons */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.amoria-play-pause-btn:hover,
.amoria-mute-unmute-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.amoria-event-overlay {
  position: absolute;
  left: 0;
  right: 0;
  padding: 20px;
  color: white;
  z-index: 5;
}

.amoria-event-title-top {
  top: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.8), transparent);
}

.amoria-event-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: white;
}

.amoria-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 10px;
}

.amoria-slider-prev,
.amoria-slider-next {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  pointer-events: all;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.amoria-slider-prev:hover,
.amoria-slider-next:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.amoria-slider-prev:active,
.amoria-slider-next:active {
  transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
  .amoria-event-slide {
    flex: 0 0 250px;
    height: 350px;
  }

  .amoria-events-content {
    padding: 0 10px;
    gap: 15px;
  }

  .amoria-event-title {
    font-size: 16px;
  }

  .amoria-slider-prev,
  .amoria-slider-next {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .amoria-event-slide {
    flex: 0 0 200px;
    height: 300px;
  }

  .amoria-video-controls {
    bottom: 10px;
    right: 10px;
    gap: 8px;
  }

  .amoria-play-pause-btn,
  .amoria-mute-unmute-btn {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
}

/* Loading animation */
.amoria-event-video[data-loading="true"] {
  background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
    linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  animation: loading 1s linear infinite;
}

@keyframes loading {
  0% {
    background-position: 0 0, 0 10px, 10px -10px, 10px 0px;
  }
  100% {
    background-position: 20px 20px, 20px 30px, 30px 10px, 30px 20px;
  }
}

/* Admin styles */
.amoria-event-video-meta {
  margin-top: 10px;
}

.amoria-event-video-meta .form-table th {
  width: 150px;
}

.amoria-event-video-meta .regular-text {
  width: 100%;
  max-width: 400px;
}

/* Video aspect ratio container */
.amoria-event-media-wrapper::before {
  content: "";
  display: block;
  padding-top: 177.78%; /* 16:9 aspect ratio inverted for portrait */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
}

/* Ensure media maintains portrait orientation */
.amoria-event-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Hide fallback image by default if video is primary */
.amoria-media-hidden {
  display: none !important;
}

/* Style for detected video error state */
.amoria-video-error-detected .amoria-event-video,
.amoria-video-error-detected .amoria-video-controls {
  display: none !important;
}

.amoria-video-error-detected .amoria-event-image {
  display: block !important; /* Show fallback image */
}

/* If no fallback image, hide the whole slide */
.amoria-video-error-detected.amoria-no-fallback-image {
  display: none !important;
}

/* Custom scrollbar for webkit browsers (still hidden by JS) */
.amoria-events-slider::-webkit-scrollbar {
  height: 8px;
}

.amoria-events-slider::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.amoria-events-slider::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.amoria-events-slider::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Focus styles for accessibility */
.amoria-play-pause-btn:focus,
.amoria-mute-unmute-btn:focus,
.amoria-slider-prev:focus,
.amoria-slider-next:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .amoria-event-overlay {
    background: rgba(0, 0, 0, 0.9);
  }

  .amoria-video-controls button {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid white;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .amoria-event-slide {
    transition: none;
  }

  .amoria-events-content {
    transition: none !important; /* Override JS transition */
  }

  .amoria-video-controls {
    transition: none;
  }
}
