/* Dog Gallery Modal - Berni's Diamonds Kennel */

.dog-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

.dog-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.dog-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(12px);
}

.dog-modal-content {
  position: relative;
  width: min(95vw, 1100px);
  max-height: 90vh;
  background:
    radial-gradient(circle at 0 0, rgba(196,154,65,0.14), transparent 65%),
    radial-gradient(circle at 100% 100%, rgba(231,198,118,0.10), transparent 60%),
    linear-gradient(155deg, #0b0b0b, #141414 40%, #1b1b1b 100%);
  border-radius: 1.5rem;
  border: 1px solid rgba(244,223,166,0.25);
  box-shadow: 0 22px 60px rgba(0,0,0,0.72);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transform: scale(0.9);
  transition: transform 0.3s ease-out;
}

.dog-modal.active .dog-modal-content {
  transform: scale(1);
}

.dog-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(244,223,166,0.35);
  background: rgba(10,10,10,0.85);
  color: var(--text-main);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-out;
  z-index: 10;
}

.dog-modal-close:hover {
  background: rgba(196,154,65,0.25);
  border-color: rgba(244,223,166,0.55);
  transform: rotate(90deg);
}

.dog-modal-header {
  text-align: center;
  padding: 0 3rem;
}

.dog-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  background: linear-gradient(120deg, #E7C676, #F4DFA6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dog-modal-info {
  font-size: 0.9rem;
  color: rgba(244,223,166,0.70);
}

.dog-modal-gallery {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.dog-modal-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dog-modal-image {
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  border-radius: 1rem;
  border: 1px solid rgba(244,223,166,0.18);
  box-shadow: 0 16px 40px rgba(0,0,0,0.62);
  object-fit: contain;
}

.dog-modal-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(10,10,10,0.90);
  border: 1px solid rgba(244,223,166,0.22);
  color: rgba(244,223,166,0.85);
  font-size: 0.85rem;
  font-weight: 600;
}

.dog-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(244,223,166,0.35);
  background: rgba(10,10,10,0.85);
  color: var(--text-main);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-out;
  z-index: 5;
}

.dog-modal-nav:hover {
  background: rgba(196,154,65,0.25);
  border-color: rgba(244,223,166,0.55);
  transform: translateY(-50%) scale(1.1);
}

.dog-modal-prev {
  left: 1rem;
}

.dog-modal-next {
  right: 1rem;
}

.dog-modal-thumbnails {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.5rem;
  max-height: 120px;
  overflow-y: auto;
}

.dog-modal-thumb {
  width: 80px;
  height: 80px;
  border-radius: 0.6rem;
  border: 2px solid rgba(244,223,166,0.20);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease-out;
  background: #0A0A0A;
}

.dog-modal-thumb:hover {
  border-color: rgba(244,223,166,0.50);
  transform: scale(1.05);
}

.dog-modal-thumb.active {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(231,198,118,0.30);
}

.dog-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrollbar styling for thumbnails */
.dog-modal-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.dog-modal-thumbnails::-webkit-scrollbar-track {
  background: rgba(10,10,10,0.50);
  border-radius: 999px;
}

.dog-modal-thumbnails::-webkit-scrollbar-thumb {
  background: rgba(196,154,65,0.50);
  border-radius: 999px;
}

.dog-modal-thumbnails::-webkit-scrollbar-thumb:hover {
  background: rgba(231,198,118,0.70);
}

/* Responsive */
@media (max-width: 768px) {
  .dog-modal-content {
    width: 95vw;
    padding: 1rem;
    gap: 0.8rem;
  }

  .dog-modal-header {
    padding: 0 2rem;
  }

  .dog-modal-title {
    font-size: 1.2rem;
  }

  .dog-modal-info {
    font-size: 0.8rem;
  }

  .dog-modal-gallery {
    min-height: 300px;
  }

  .dog-modal-image {
    max-height: 50vh;
  }

  .dog-modal-nav {
    width: 40px;
    height: 40px;
    font-size: 2rem;
  }

  .dog-modal-prev {
    left: 0.5rem;
  }

  .dog-modal-next {
    right: 0.5rem;
  }

  .dog-modal-thumb {
    width: 60px;
    height: 60px;
  }

  .dog-modal-close {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .dog-modal-content {
    padding: 0.8rem;
  }

  .dog-modal-header {
    padding: 0 1.5rem;
  }

  .dog-modal-title {
    font-size: 1rem;
  }

  .dog-modal-counter {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
  }
}
