/**
 * Gallery Carousel Block - Styles
 */

/* Editor Styles */
.doorways-gallery-carousel-editor {
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
}

.doorways-gallery-carousel-editor__toolbar {
  margin-bottom: 20px;
}

.doorways-gallery-carousel-editor__add-button {
  width: 100%;
}

.doorways-gallery-carousel-editor__placeholder {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  background: #fff;
  border: 2px dashed #ddd;
  border-radius: 4px;
}

.doorways-gallery-carousel-editor__images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.doorways-gallery-carousel-editor__image-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  border: 2px solid #ddd;
  background: #fff;
}

.doorways-gallery-carousel-editor__image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doorways-gallery-carousel-editor__title-input {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
}

.doorways-gallery-carousel-editor__title-input label {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 2px;
  display: block;
}

.doorways-gallery-carousel-editor__title-input input {
  font-size: 12px;
  padding: 4px 6px;
}

.doorways-gallery-carousel-editor__image-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 5px;
  background: rgba(0, 0, 0, 0.7);
}

.doorways-gallery-carousel-editor__image-controls button {
  padding: 4px 8px;
  font-size: 16px;
  line-height: 1;
}

/* Frontend Styles */
.doorways-gallery-carousel {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.doorways-gallery-carousel__main {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  border-radius: 8px;
}

.doorways-gallery-carousel__slide {
  display: none;
  width: 100%;
  position: relative;
}

.doorways-gallery-carousel__slide.active {
  display: block;
}

.doorways-gallery-carousel__slide-header {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;

  max-width: 90%;
}

.doorways-gallery-carousel__slide-label {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  letter-spacing: 2px;
  font-weight: 500;
  margin-bottom: 5px;
}

.doorways-gallery-carousel__slide-title {
  font-family: "Libre Baskerville", serif;
  font-size: 36px;
  font-weight: 400;
  color: #fff;

  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);

  line-height: 1.3;
  margin-top: 8px;
}

.doorways-gallery-carousel__slide img {
  width: 100%;
  height: auto;
  display: block;
}

.doorways-gallery-carousel__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}

/* Navigation Buttons */
.doorways-gallery-carousel__controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
  z-index: 10;
}

.doorways-gallery-carousel__prev,
.doorways-gallery-carousel__next {
  pointer-events: all;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.doorways-gallery-carousel__prev:hover,
.doorways-gallery-carousel__next:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}

.doorways-gallery-carousel__prev:active,
.doorways-gallery-carousel__next:active {
  transform: scale(0.95);
}

/* Thumbnails */
.doorways-gallery-carousel__thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.doorways-gallery-carousel__thumbnail {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  background: none;
}

.doorways-gallery-carousel__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.doorways-gallery-carousel__thumbnail:hover {
  border-color: #999;
  transform: scale(1.05);
}

.doorways-gallery-carousel__thumbnail.active {
  border-color: #252c62;
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
  .doorways-gallery-carousel__prev,
  .doorways-gallery-carousel__next {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

.doorways-gallery-carousel__slide-label {
  font-size: 20px;
  letter-spacing: 1px;
  margin-bottom: 3px;
}

.doorways-gallery-carousel__thumbnail {
  width: 60px;
  height: 60px;
}

.doorways-gallery-carousel__caption {
  padding: 10px 15px;
  font-size: 12px;
}

.doorways-gallery-carousel__slide-header {
  font-size: 16px;
  padding: 8px 16px;
  letter-spacing: 1px;
}

/* Animation */
.doorways-gallery-carousel__slide {
  animation: fadeIn 0.5s ease-in-out;
}

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