/* ─── Projects Slider ─────────────────────────────────────────── */

.jhchoi-projects-slider .splide {
  width: 100%;
}

.jhchoi-projects-slider .splide__slide {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 480px;
  overflow: hidden;
}

/* If logged in admin, limit the slide height to avoid covering the whole screen */
.admin-bar .jhchoi-projects-slider .splide__slide {
  height: calc(100vh - 32px);
  height: calc(100dvh - 32px);
}

.jhchoi-projects-slider .splide__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.jhchoi-projects-slider .jhchoi-slide-no-image {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
}

/* ─── Default vs. alternate (portrait) image ──────────────────── */

.jhchoi-projects-slider .jhchoi-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.jhchoi-projects-slider .jhchoi-slide-image--alternate {
  display: none;
}

@media (orientation: portrait) {
  .jhchoi-projects-slider .splide__slide.has-alternate-image .jhchoi-slide-image--default {
    display: none;
  }

  .jhchoi-projects-slider .splide__slide.has-alternate-image .jhchoi-slide-image--alternate {
    display: block;
  }
}

/* ─── Slide link (title only) ─────────────────────────────────── */

.jhchoi-projects-slider .jhchoi-slide-link {
  color: inherit;
  text-decoration: none;
}

.jhchoi-projects-slider .jhchoi-slide-link:hover {
  text-decoration: underline;
}

/* ─── Title overlay ───────────────────────────────────────────── */

.jhchoi-projects-slider .jhchoi-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  /*padding: 60px 40px 56px;*/
  padding: 60px 40px 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
  text-align: center;
}

.jhchoi-projects-slider .jhchoi-slide-location {
  margin: 0 0 0.35em;
  color: #ffffff;
  font-size: var(--text-body-l);
}

.jhchoi-projects-slider .jhchoi-slide-title {
  margin: 0;
  color: #ffffff;
  font-size: var(--text-1);
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  padding-bottom: 1rem;
  font-weight: bold;
}

/* ─── Dot navigation ─────────────────────────────────────────── */

.jhchoi-projects-slider .splide__pagination {
  bottom: 2rem;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  justify-content: center;
  gap: 20px;
  display: none;
}

.jhchoi-projects-slider .splide__pagination__page {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  padding: 0;
  margin: 0;
  transition: background 0.25s ease;
  opacity: 1;
  transform: none;
}

.jhchoi-projects-slider .splide__pagination__page.is-active {
  background: #ffffff;
}

/* ─── Visual Builder: Child slide ───────────────────────────── */

.jhchoi-canvas-slide {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jhchoi-canvas-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.jhchoi-canvas-slide-nothumb {
  position: absolute;
  inset: 0;
  background: #1a1a1a;
}

.jhchoi-canvas-slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 40px 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
  text-align: center;
  z-index: 1;
}

.jhchoi-canvas-slide-location {
  margin: 0 0 0.35em;
  color: #fff;
  font-size: var(--text-body-l, 14px);
}

.jhchoi-canvas-slide-title {
  margin: 0;
  color: #fff;
  font-size: var(--text-1, 1.5rem);
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  padding-bottom: 1rem;
}

/* ─── Visual Builder: Parent slider ─────────────────────────── */

.jhchoi-vb-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.jhchoi-vb-slides {
  width: 100%;
}

.jhchoi-vb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.jhchoi-vb-arrow:hover {
  background: rgba(0, 0, 0, 0.6);
}

.jhchoi-vb-arrow-prev { left: 12px; }
.jhchoi-vb-arrow-next { right: 12px; }

.jhchoi-vb-dots {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 14px;
  z-index: 10;
  pointer-events: none;
}

.jhchoi-vb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  pointer-events: all;
  transition: background 0.25s ease;
}

.jhchoi-vb-dot.active {
  background: #fff;
}

/* ─── Visual Builder preview (legacy) ───────────────────────── */

.jhchoi-slider-empty-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 260px;
  background: #f0f0f0;
  color: #666;
  font-size: var(--text-body-xs);
  text-align: center;
  padding: 24px;
}

.jhchoi-slider-preview {
  width: 100%;
  height: 300px;
  position: relative;
  overflow: hidden;
}

.jhchoi-preview-slide {
  width: 100%;
  height: 100%;
  position: relative;
}

.jhchoi-preview-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2a2a2a 0%, #4a4a4a 100%);
}

.jhchoi-preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
}

.jhchoi-preview-title {
  display: block;
  color: #fff;
  font-size: var(--text-1);
  margin-bottom: 12px;
}

.jhchoi-preview-dots {
  display: flex;
  gap: 6px;
}

.jhchoi-preview-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.jhchoi-preview-dot.active {
  background: #fff;
}

/* ─── Post picker (VB settings panel) ───────────────────────── */

.jhchoi-project-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}

.jhchoi-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: var(--text-body-xs);
}

.jhchoi-picker-item input[type="checkbox"] {
  flex-shrink: 0;
}

.jhchoi-picker-loading,
.jhchoi-picker-empty {
  font-size: var(--text-body-xs);
  color: #888;
  padding: 8px 0;
}
