/* Highlights Grid Styles */
.whk-highlights-grid {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}

.whk-highlights-grid.whk-col-1 {
  grid-template-columns: 1fr;
}

.whk-highlights-grid.whk-col-2 {
  grid-template-columns: repeat(2, 1fr);
}

.whk-highlights-grid.whk-col-3 {
  grid-template-columns: repeat(3, 1fr);
}

.whk-highlights-grid.whk-col-4 {
  grid-template-columns: repeat(4, 1fr);
}

.whk-highlights-grid.whk-col-5 {
  grid-template-columns: repeat(5, 1fr);
}

.whk-highlights-grid.whk-col-6 {
  grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 768px) {
  .whk-highlights-grid.whk-col-2,
  .whk-highlights-grid.whk-col-3,
  .whk-highlights-grid.whk-col-4,
  .whk-highlights-grid.whk-col-5,
  .whk-highlights-grid.whk-col-6 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .whk-highlights-grid.whk-col-3,
  .whk-highlights-grid.whk-col-4,
  .whk-highlights-grid.whk-col-5,
  .whk-highlights-grid.whk-col-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.whk-highlight-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f0f0f0;
}

.whk-highlight-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.whk-highlight-title {
  padding: 15px;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

/* Modal Styles */
.whk-highlight-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
}

.whk-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.whk-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 500px;
  max-height: 100%;
  background: #0e0e0e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.whk-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  background: #0e0e0e4f;
  padding: 5px 20px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
}

.whk-modal-title {
  margin: 0;
  font-size: 16px;
  color: #fff;
}

.whk-modal-close {
  background: none;
  border: none;
  font-size: 2em;
  cursor: pointer;
  color: #ffffff;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.whk-modal-close:hover {
  background: #f0f0f0;
}

.whk-modal-body {
  height: calc(100% - 60px);
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding: 10px;
}

.whk-modal-body .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.whk-main-media {
  margin-bottom: 10px;
  text-align: center;
  width: 100%;
  height: calc(100% - 50px);
  position: relative;
  overflow: hidden;
}

.whk-main-media .controlers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.whk-main-media .controlers button {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  cursor: pointer;
  padding: 12px;
  width: 33.33%;
  height: 100%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  opacity: 0;
}

.whk-main-media .controlers button.show {
  opacity: 1;
}

/* حذف hover effect - فقط برای اولین بار نمایش داده می‌شود */

.whk-main-media .controlers button svg {
  width: 32px;
  height: 32px;
  color: #ffffff;
  stroke-width: 2.5;
}

.whk-main-media .controlers .whk-modal-pause .play-icon {
  display: none;
}

.whk-main-media .controlers .whk-modal-pause.playing .pause-icon {
  display: none;
}

.whk-main-media .controlers .whk-modal-pause.playing .play-icon {
  display: block;
}

/* خط‌های نشانگر به جای گالری */
.whk-swiper-indicators {
  display: flex;
  width: 100%;
  gap: 2px;
  padding: 10px 0;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 0 5px;
}

.whk-indicator-line {
  flex: 1;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.whk-indicator-line.active {
  background-color: rgba(255, 255, 255, 0.9);
}

.whk-media-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whk-media-item iframe {
  width: 100%;
  height: 100%;
}

.whk-media-item img {
  height: 100%;
}

.whk-media-gallery h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 1.2em;
}

.whk-media-gallery-item {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  transition: transform 0.3s ease;
  max-width: 100px;
}

.whk-media-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.whk-media-type {
  color: #fff;
  font-weight: bold;
  font-size: 0.9em;
}

/* Media Viewer */
.whk-media-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
}

.whk-viewer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.whk-viewer-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.whk-viewer-content img,
.whk-viewer-content video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
}

.whk-viewer-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 2em;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whk-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  color: #ffffff;
}

.whk-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #2c2c2c;
  border-top: 4px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Body lock when modal is open */
body.whk-modal-open {
  overflow: hidden;
}

/* Error message styles */
.whk-error-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #f44336;
  color: white;
  padding: 15px 20px;
  border-radius: 4px;
  z-index: 10000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  max-width: 300px;
  animation: slideInRight 0.3s ease-out;
}

.whk-error-message strong {
  display: block;
  margin-bottom: 5px;
}

.whk-error-message button {
  float: right;
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  margin-left: 10px;
  padding: 0;
  line-height: 1;
}

.whk-error-message button:hover {
  opacity: 0.8;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* No media message */
.whk-no-media {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.whk-no-media p {
  margin: 0;
  font-size: 16px;
}

@media screen and (min-width: 1024px) {
  .whk-modal-content {
    max-height: 95%;
  }
}
