/* Pelni Entertainment — PELNIGO tablet kiosk */

body.page-pelni-entertainment {
  --ent-sidebar: 150px;
  --ent-layout-gap: 14px;
}

body.page-pelni-entertainment.theme-light.has-bg-parallax .bg-parallax::after,
body.page-pelni-entertainment.theme-dark.has-bg-parallax .bg-parallax::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

body.page-pelni-entertainment.theme-light.has-bg-parallax .bg-parallax::after {
  background: rgba(255, 255, 255, 0.48);
}

body.page-pelni-entertainment.theme-dark.has-bg-parallax .bg-parallax::after {
  background: rgba(0, 0, 0, 0.52);
}

body.page-pelni-entertainment.theme-light .bg-parallax.bg-parallax--static-image {
  background-image: url("images/image-pelni-light.jpg");
  background-color: #f4f5f7;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
}

body.page-pelni-entertainment.theme-dark .bg-parallax.bg-parallax--static-image {
  background-image: url("images/bg-pelnigo-dark.jpg");
  background-color: #0c0c0c;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
}

body.page-pelni-entertainment .bg-parallax.ent-page-blur-host {
  background-image: none !important;
}

body.page-pelni-entertainment .ent-page-blur-layer {
  position: absolute;
  inset: -60px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(52px);
  transform: scale(1.18);
  opacity: 0;
  transition: opacity 0.7s ease;
  will-change: opacity;
}

body.page-pelni-entertainment .ent-page-blur-layer.is-active {
  opacity: 1;
}

body.page-pelni-entertainment .dash-wrapper {
  padding-bottom: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  display: flex;
  flex-direction: column;
}

html.pwa-standalone body.page-pelni-entertainment .dash-wrapper {
  padding-bottom: 0;
}

html.pwa-standalone body.page-pelni-entertainment .ent-layout {
  flex: 1;
  min-height: 0;
}

html.pwa-standalone body.page-pelni-entertainment .ent-catalog-scroll {
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}

body.page-pelni-entertainment .ent-layout {
  display: grid;
  grid-template-columns: var(--ent-sidebar) minmax(0, 1fr);
  gap: var(--ent-layout-gap);
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  align-items: stretch;
  background: transparent;
}

/* Top bar — grid selaras dengan .ent-layout (logo | konten) */
.ent-top-bar {
  display: grid;
  grid-template-columns: var(--ent-sidebar) minmax(0, 1fr);
  gap: var(--ent-layout-gap);
  align-items: center;
}

.ent-top-bar .top-left {
  grid-column: 1;
  grid-row: 1;
  width: auto;
  min-width: 0;
}

.ent-top-bar .top-right {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  flex-shrink: 0;
  margin-left: 0;
}

.ent-header {
  display: flex;
  align-items: center;
  gap: 15px;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.ent-layout {
  display: grid;
  grid-template-columns: var(--ent-sidebar) minmax(0, 1fr);
  gap: var(--ent-layout-gap);
  flex: 1;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
  background: transparent;
}

.ent-categories {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: var(--ent-sidebar);
  max-width: var(--ent-sidebar);
  flex-shrink: 0;
  min-height: 0;
  min-width: 0;
}

.ent-back {
  width: 32px;
  height: 32px;
  border-radius: 32px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ent-back:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.ent-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.ent-cat-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  overflow-y: auto;
  flex: 0 1 auto;
  max-height: 100%;
  width: 100%;
}

.ent-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ent-cat-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
  box-shadow: 0 0 0 2px transparent;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.ent-cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ent-cat-thumb--lottie {
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  margin-top: -10px;
}

.ent-cat-lottie {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ent-cat-lottie svg {
  width: 70% !important;
  height: 70% !important;
}

body.page-pelni-entertainment:not(.page-order-cargo) .ent-cat-lottie svg [stroke]:not([stroke="none"]),
body.page-pelni-entertainment:not(.page-order-cargo) .ent-cat-lottie svg path.secondary,
body.page-pelni-entertainment:not(.page-order-cargo) .ent-cat-lottie svg .secondary,
body.page-pelni-entertainment:not(.page-order-cargo) .ent-cat-lottie svg path.primary,
body.page-pelni-entertainment:not(.page-order-cargo) .ent-cat-lottie svg .primary {
  stroke: #ffffff !important;
}

body.page-pelni-entertainment:not(.page-order-cargo) .ent-cat-lottie svg [fill]:not([fill="none"]) {
  fill: #ffffff !important;
}

.ent-cat-item:hover .ent-cat-thumb--lottie,
.ent-cat-item.is-active .ent-cat-thumb--lottie {
  box-shadow: none;
  transform: none;
}

.ent-cat-item:hover .ent-cat-thumb:not(.ent-cat-thumb--lottie) {
  box-shadow: 0 0 0 2px rgba(57, 90, 255, 0.45);
}

.ent-cat-item.is-active .ent-cat-thumb:not(.ent-cat-thumb--lottie) {
  box-shadow: 0 0 0 3px var(--primary);
  transform: scale(1.02);
}

.ent-cat-item:hover {
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(255, 255, 255, 0.55);
}

.ent-cat-item.is-active {
  background: rgba(57, 90, 255, 0.72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-color: rgba(57, 90, 255, 0.95);
  box-shadow: 0 8px 20px rgba(57, 90, 255, 0.28);
}

.ent-cat-name {
  display: block;
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  font-family: "Poppins";
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: -5px;
}

.ent-cat-item.is-active .ent-cat-name {
  color: #fff;
}

/* Catalog */
.ent-catalog {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  position: relative;
  background: transparent;
}

.ent-catalog-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
}

.ent-toolbar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 10px 0;
  flex-shrink: 0;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.ent-banner {
  position: relative;
  width: 100%;
  height: 400px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 5px;
}

.ent-banner-viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  touch-action: pan-y;
}

.ent-banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.ent-banner-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.ent-banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ent-banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 3;
  pointer-events: none;
}

.ent-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.ent-banner-dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

.ent-search-wrap {
  position: relative;
  flex: 0 0 350px;
  width: 350px;
  max-width: 350px;
}

.ent-toolbar-filters {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-shrink: 0;
}

.ent-genre,
.ent-sort {
  position: relative;
  flex-shrink: 0;
  width: min(180px, 34%);
  min-width: 180px;
}

.ent-genre-trigger,
.ent-sort-trigger {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 1);
  border-radius: var(--radius-md);
  background: transparent;
  padding: 10px 50px 10px 42px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  text-align: left;
  position: relative;
  display: flex;
  align-items: center;
}

.ent-genre-trigger.is-open,
.ent-genre-trigger:focus-visible,
.ent-sort-trigger.is-open,
.ent-sort-trigger:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.ent-genre-label,
.ent-sort-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.ent-genre-icon,
.ent-sort-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.ent-genre-chevron,
.ent-sort-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  pointer-events: none;
  transition: transform 0.15s ease;
}

.ent-genre-trigger.is-open .ent-genre-chevron,
.ent-sort-trigger.is-open .ent-sort-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.ent-genre-menu,
.ent-sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  padding: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.ent-genre-menu[hidden],
.ent-sort-menu[hidden] {
  display: none;
}

.ent-genre-option,
.ent-sort-option {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: transparent;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ent-genre-option:hover,
.ent-genre-option:focus-visible,
.ent-sort-option:hover,
.ent-sort-option:focus-visible {
  background: var(--primary-soft);
  color: var(--primary);
  outline: none;
}

.ent-genre-option.is-active,
.ent-sort-option.is-active {
  background: var(--primary);
  color: #fff;
}

.ent-search {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 1);
  border-radius: var(--radius-md);
  background: transparent;
  padding: 10px 52px 10px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ent-search::placeholder {
  color: #000;
  opacity: 1;
}

.ent-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.ent-search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  pointer-events: none;
}

.ent-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: max-content;
  gap: 15px;
  padding-top: 5px;
  align-content: start;
  flex-shrink: 0;
}

.ent-card {
  display: block;
  min-width: 0;
  width: 100%;
  background: transparent;
  border: none;
  overflow: hidden;
}

.ent-card-poster {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: 280px;
}

.ent-card-poster::before {
  content: "";
  display: block;
  padding-top: 150%;
}

.ent-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.ent-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.ent-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.ent-badge--popular {
  background: var(--primary);
}

.ent-badge--live {
  background: #ef4444;
}

.ent-card-body {
  position: relative;
  z-index: 1;
  padding: 10px 0 0;
  background: inherit;
}

.ent-card-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
}

.ent-card-genre {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ent-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ent-card-year {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
  flex-shrink: 0;
}

.ent-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Light theme — top bar buttons selaras kategori */
body.page-pelni-entertainment.theme-light .ent-back {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

body.page-pelni-entertainment.theme-light .ent-back:hover {
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--primary);
}

body.page-pelni-entertainment.theme-light .ent-top-bar .icon-small:not(.active) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

/* Dark theme — entertainment page */
body.page-pelni-entertainment.theme-dark .ent-top-bar .icon-small:not(.active) {
  background: rgba(19, 19, 24, 0.3);
  border-color: rgba(255, 255, 255, 0.14);
}

body.page-pelni-entertainment.theme-dark .ent-back {
  background: rgba(19, 19, 24, 0.3);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-main);
}

body.page-pelni-entertainment.theme-dark .ent-back:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: #fff;
}

body.theme-dark .ent-card {
  background: rgba(19, 19, 24, 0.92);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 8px 22px rgba(0, 0, 0, 0.28);
}

body.page-pelni-entertainment.theme-dark .ent-search,
body.page-pelni-entertainment.theme-dark .ent-genre-trigger,
body.page-pelni-entertainment.theme-dark .ent-sort-trigger {
  background: rgba(19, 19, 24, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

body.theme-dark .ent-search::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

body.theme-dark .ent-genre-menu,
body.theme-dark .ent-sort-menu {
  background: rgba(19, 19, 24, 0.98);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

body.theme-dark .ent-genre-option:hover,
body.theme-dark .ent-genre-option:focus-visible,
body.theme-dark .ent-sort-option:hover,
body.theme-dark .ent-sort-option:focus-visible {
  background: var(--primary-soft);
  color: #fff;
}

body.theme-dark .ent-genre-option.is-active,
body.theme-dark .ent-sort-option.is-active {
  background: var(--primary);
  color: #fff;
}

body.page-pelni-entertainment.theme-dark .ent-cat-item {
  background: rgba(19, 19, 24, 0.3);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.18),
    0 8px 22px rgba(0, 0, 0, 0.22);
}

body.page-pelni-entertainment.theme-dark .ent-cat-item:hover {
  background: rgba(19, 19, 24, 0.42);
  border-color: rgba(255, 255, 255, 0.28);
}

body.page-pelni-entertainment.theme-dark .ent-cat-item.is-active {
  background: rgba(57, 90, 255, 0.88);
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(57, 90, 255, 0.32);
}

body.page-pelni-entertainment.theme-dark .ent-cat-item.is-active .ent-cat-name {
  color: #fff;
}

/* Responsive */
@media (max-width: 860px) {
  .ent-top-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .ent-top-bar .top-left,
  .ent-top-bar .top-right,
  .ent-header {
    grid-column: auto;
    grid-row: auto;
  }

  .ent-top-bar .top-right {
    margin-left: auto;
  }

  .ent-header {
    order: 3;
    width: 100%;
  }

  .ent-toolbar {
    flex-direction: column;
  }

  .ent-genre,
  .ent-sort {
    width: 100%;
    min-width: 0;
  }

  .ent-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(320px, 1fr);
    overflow-y: auto;
  }

  .ent-categories {
    width: auto;
    max-width: none;
  }

  .ent-cat-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    flex: initial;
  }

  .ent-cat-item {
    width: 120px;
    height: 120px;
    min-width: 120px;
    flex-shrink: 0;
  }

  .ent-catalog {
    min-height: 320px;
  }

  .page-pelni-entertainment .ent-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 240px;
  }
}
