/* Decklist Modal - matching original modal.css */
.decklist-list-container {
  position: relative; /* Positioning context for the modal */
  max-height: 500px; /* Match the original max-height */
  overflow-y: auto; /* Restore scrolling */
  margin-bottom: 20px; /* Keep the original margin */
}

.decklist-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 10px;
  cursor: pointer; /* Indicate clickable area for closing */
  width: 100%; /* Take full width of the container */
  height: 100%; /* Take full height of the container */
  top: 0;
  left: 0;
}

/* Add visual hint for clickable areas */
.decklist-modal::after {
  content: '← Prev | Click center for details | Next →';
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.decklist-modal:hover::after {
  opacity: 1;
}

.decklist-modal-close {
  color: #f1f1f1;
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.decklist-modal-close:hover,
.decklist-modal-close:focus {
  color: #bbb;
  text-decoration: none;
}

.decklist-modal-image {
  max-width: 300px;
  max-height: 400px;
  object-fit: contain;
  display: block;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1001;
  margin: 0; /* Reset margin to ensure proper positioning */
  transition: transform 0.2s ease;
}

.decklist-modal-image:hover {
  transform: scale(1.02);
}

/* List view styles */
.decklist-list-view {
  list-style: none;
  padding: 0;
  margin: 0;
}

.decklist-item {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #444;
  padding: 10px;
  background-color: transparent;
}

.decklist-item:last-child {
  border-bottom: none;
}

.decklist-image {
  width: 100px;
  height: 100px;
  margin-right: 20px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

.decklist-image img {
  width: 100%;
  height: auto;
}

.decklist-details {
  flex-grow: 1;
}

.decklist-title {
  font-size: 1.2em;
  margin: 0 0 5px;
  color: white;
}

.decklist-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  color: white;
}

.decklist-facts li {
  margin-bottom: 5px;
  font-size: 0.9em;
}

.decklist-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
}

/* overflow: hidden; /* Optionally, if you strictly want to clip modal content to this container's bounds, though modal has overflow:auto */

/* Leader card image styling in decklist modal */
.decklist-modal-leader-card {
  position: relative;
  overflow: visible;
}

.decklist-modal-leader-card a {
  cursor: pointer;
}

.decklist-modal-leader-card img {
  transition: all 0.3s ease-in-out;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.5));
}

.decklist-modal-leader-card a:hover img,
.decklist-modal-leader-card img:hover {
  transform: scale(1.05) translateY(-4px);
  filter: drop-shadow(0 15px 35px rgba(234, 179, 8, 0.6));
  --tw-ring-color: rgb(250 204 21 / 1) !important;
  --tw-ring-shadow: 0 0 0 2px rgb(250 204 21 / 1), 0 0 20px rgba(234, 179, 8, 0.5) !important;
}

/* Responsive adjustments for leader card */
@media (max-width: 640px) {
  .decklist-modal-leader-card img {
    max-width: 150px !important;
    max-height: 210px !important;
  }
}

/* Add shimmer effect on load */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.decklist-modal-leader-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 3s infinite;
  pointer-events: none;
  border-radius: 0.5rem;
} 