/* ICEWORK Bayswater 360 Tour - Slider + Popup Viewer */

/* ====== Reset & Base ====== */
:root {
  --bg-page: #f5f5f7;
  --bg-white: #ffffff;
  --text-dark: #1a1a2e;
  --text-grey: #64748b;
  --border-light: #e2e8f0;
  --radius-card: 24px;
  --radius-pill: 50px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset only inside the tour, so it can be embedded into other pages */
.slider-page,
.slider-page *,
.popup-overlay,
.popup-overlay *,
.popup-thumb-tip {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html.tour-standalone,
html.tour-standalone body {
  width: 100%;
  min-height: 100vh;
  background: var(--bg-page);
  font-family: var(--font);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

/* ====== Slider Page ====== */
.slider-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 60px 48px 80px;
}

/* ====== Slider ====== */
.slider-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Navigation arrows */
.slider-nav {
  position: absolute;
  z-index: 10;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.slider-nav svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-dark);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.slider-nav:hover {
  background-color: transparent;
}

.slider-nav-prev { left: -24px; }
.slider-nav-next { right: -24px; }

/* Track */
.slider-track {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 4px 16px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.slider-track::-webkit-scrollbar {
  display: none;
}

.slider-track:active {
  cursor: grabbing;
}

/* Cards (vertical portrait, matching icework.ae) */
.slider-card {
  position: relative;
  flex-shrink: 0;
  width: calc(33.333% - 20px);
  min-width: 300px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  background: #e8e8e8;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.slider-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Frosted glass badge top-left */
.card-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.slider-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.slider-card:hover img {
  transform: scale(1.04);
}

/* ====== Popup Overlay ====== */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}

.popup-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.popup-overlay.visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.popup-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Close button */
.popup-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 20;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-close svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  fill: none;
}

.popup-close:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.1);
}

/* Scene title pill */
.popup-title-bar {
  position: absolute;
  top: 22px;
  left: 24px;
  z-index: 20;
}

.popup-scene-pill {
  display: inline-block;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
}

/* Viewer controls */
.popup-controls {
  position: absolute;
  top: 22px;
  right: 80px;
  z-index: 20;
  display: flex;
  gap: 8px;
}

.popup-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-btn svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.popup-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.popup-btn.active {
  background: rgba(0, 200, 255, 0.2);
  border-color: rgba(0, 200, 255, 0.4);
}

/* 360 Panorama box */
.panorama-box {
  width: calc(100% - 40px);
  max-width: 1200px;
  height: calc(100vh - 180px);
  max-height: 720px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

/* Bottom thumbnails strip */
.popup-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: center;
  overflow-x: auto;
  max-width: 100%;
  padding: 4px;
  scrollbar-width: none;
}

.popup-thumbs::-webkit-scrollbar {
  display: none;
}

.popup-thumb {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.popup-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.popup-thumb:hover {
  opacity: 0.9;
  border-color: rgba(255, 255, 255, 0.4);
}

.popup-thumb.active {
  opacity: 1;
  border-color: #fff;
}

.popup-thumb-tip {
  position: fixed;
  z-index: 100000;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.popup-thumb-tip.visible {
  opacity: 1;
}

/* Pannellum overrides */
.pnlm-container {
  background: #000 !important;
}

.pnlm-load-box {
  background: rgba(20, 20, 30, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  color: #fff !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5) !important;
}

.pnlm-controls-container,
.pnlm-compass,
.pnlm-panorama-info {
  display: none !important;
}

/* ====== Responsive ====== */
@media (max-width: 1024px) {
  .slider-page {
    padding: 40px 28px 60px;
  }

  .slider-card {
    min-width: 260px;
  }

  .slider-nav-prev { left: -12px; }
  .slider-nav-next { right: -12px; }
}

@media (max-width: 768px) {
  .slider-page {
    padding: 24px 16px 48px;
  }

  .slider-card {
    min-width: 220px;
  }

  .slider-nav {
    width: 40px;
    height: 40px;
  }

  .slider-nav-prev { left: -6px; }
  .slider-nav-next { right: -6px; }

  .panorama-box {
    width: 100%;
    height: calc(100vh - 140px);
    border-radius: 10px;
  }

  .popup-thumbs {
    gap: 6px;
  }

  .popup-thumb {
    width: 56px;
    height: 56px;
    min-width: 56px;
  }

  .popup-controls {
    right: 68px;
    gap: 4px;
  }

  .popup-btn {
    width: 36px;
    height: 36px;
  }
}

/* ====== Fullscreen mode: hide thumbs, panorama fills the screen ====== */
html:fullscreen .popup-thumbs {
  display: none;
}

html:fullscreen .popup-content {
  padding: 0;
}

html:fullscreen .panorama-box {
  width: 100%;
  max-width: none;
  height: 100vh;
  max-height: none;
  border-radius: 0;
}

/* ====== Slider arrows: same corner tabs as the icework.ae blocks ====== */
.slider-nav,
.slider-nav:hover {
  top: 50%;
  margin: -38px 0 0;
  width: 54px;
  height: 75px;
  border: none;
  border-radius: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
  transform: none;
}

.slider-nav svg {
  display: none;
}

.slider-nav-prev {
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='54' height='75' viewBox='0 0 54 75' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.031913 3.0629e-05C0.031913 3.0629e-05 -2.15371 11.8106 29.6499 11.8106C61.4535 11.8106 61.1321 59.9846 29.6499 59.9846C-1.83233 59.9846 0.0319209 74.335 0.0319209 74.335L0.031913 3.0629e-05Z' fill='white' fill-opacity='0.5'/%3E%3Cpath d='M23.6916 37.1784C23.6912 37.4121 23.7725 37.6385 23.9216 37.8184L27.9216 42.8184C28.0914 43.0227 28.3353 43.1511 28.5997 43.1755C28.8641 43.1998 29.1274 43.1182 29.3316 42.9484C29.5358 42.7787 29.6643 42.5348 29.6886 42.2704C29.713 42.0059 29.6314 41.7427 29.4616 41.5384L25.9816 37.1784L29.3016 32.8184C29.3847 32.7161 29.4467 32.5985 29.4841 32.4721C29.5216 32.3458 29.5337 32.2133 29.5197 32.0823C29.5058 31.9512 29.4661 31.8242 29.4029 31.7086C29.3398 31.593 29.2543 31.491 29.1516 31.4084C29.0488 31.3169 28.9282 31.2475 28.7973 31.2047C28.6664 31.1619 28.5281 31.1466 28.3911 31.1598C28.254 31.1729 28.1211 31.2142 28.0008 31.2811C27.8804 31.348 27.7752 31.439 27.6916 31.5484L23.8616 36.5484C23.7361 36.7335 23.6762 36.9553 23.6916 37.1784Z' fill='%230A0F0D'/%3E%3C/svg%3E%0A");
}

.slider-nav-next {
  right: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='54' height='75' viewBox='0 0 54 75' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M53.3504 3.0629e-05C53.3504 3.0629e-05 55.536 11.8106 23.7324 11.8106C-8.07117 11.8106 -7.74979 59.9846 23.7324 59.9846C55.2147 59.9846 53.3504 74.335 53.3504 74.335L53.3504 3.0629e-05Z' fill='white' fill-opacity='0.5'/%3E%3Cpath d='M29.6907 37.1784C29.6912 37.4121 29.6098 37.6385 29.4607 37.8184L25.4607 42.8184C25.291 43.0227 25.0471 43.1511 24.7826 43.1755C24.5182 43.1998 24.2549 43.1182 24.0507 42.9484C23.8465 42.7787 23.7181 42.5348 23.6937 42.2704C23.6693 42.0059 23.751 41.7427 23.9207 41.5384L27.4007 37.1784L24.0807 32.8184C23.9976 32.7161 23.9356 32.5985 23.8982 32.4721C23.8607 32.3458 23.8487 32.2133 23.8626 32.0823C23.8765 31.9512 23.9162 31.8242 23.9794 31.7086C24.0426 31.593 24.128 31.491 24.2307 31.4084C24.3335 31.3169 24.4542 31.2475 24.585 31.2047C24.7159 31.1619 24.8542 31.1466 24.9913 31.1598C25.1283 31.1729 25.2612 31.2142 25.3816 31.2811C25.5019 31.348 25.6072 31.439 25.6907 31.5484L29.5207 36.5484C29.6462 36.7335 29.7061 36.9553 29.6907 37.1784Z' fill='%230A0F0D'/%3E%3C/svg%3E%0A");
}

@media (max-width: 768px) {
  .slider-nav {
    display: none;
  }
}

/* ====== Scene-to-scene arrows inside the panorama ====== */
.tour-arrow {
  width: 0;
  height: 0;
  cursor: pointer;
}

.tour-arrow-btn {
  position: absolute;
  left: -29px;
  top: -29px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a2e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 14l6-6 6 6'/%3E%3C/svg%3E") center / 30px no-repeat;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.tour-arrow:hover .tour-arrow-btn {
  background-color: #fff;
  transform: scale(1.12);
}

.tour-arrow-label {
  position: absolute;
  left: 0;
  top: 38px;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  pointer-events: none;
}

@media (max-width: 768px) {
  .tour-arrow-btn {
    left: -23px;
    top: -23px;
    width: 46px;
    height: 46px;
    background-size: 24px;
  }

  .tour-arrow-label {
    top: 30px;
    font-size: 12px;
  }
}
