/* Light theme overrides — PELNIGO tablet kiosk */
body.theme-light {
  --bg: #f4f5f7;
  --panel-bg: rgba(255, 255, 255, 0.92);
  --panel-bg-soft: rgba(255, 255, 255, 0.88);
  --panel-bg-soft2: #f3f5f9;
  --primary: #395aff;
  --primary-soft: rgba(57, 90, 255, 0.14);
  --accent: #395aff;
  --accent-soft: rgba(57, 90, 255, 0.12);
  --text-main: #0c0c0c;
  --text-muted: #424146;
  --border-soft: rgba(255, 255, 255, 0.5);
  --shadow-soft: 0 14px 32px rgba(15, 23, 42, 0.1);
  --card-blur: 10px;
}

body.theme-light,
body.theme-light html {
  background-color: #f4f5f7;
  color: var(--text-main);
}

body.theme-light::before {
  background-image: none;
  background-color: #f4f5f7;
  opacity: 1;
  transform: none;
}

body.theme-light .bg-parallax {
  background-image: none;
  background-color: #f4f5f7;
  opacity: 1;
  transform: none;
}

body.theme-light:not(.has-bg-parallax)::before {
  background-image: url("images/image-pelni-light.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (prefers-reduced-motion: reduce) {
  body.theme-light::before {
    background-image: url("images/image-pelni-light.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
  }

  body.theme-light .bg-parallax-video {
    display: none;
  }
}

body.theme-light .dash-wrapper {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--text-main);
  overflow: hidden;
}

html:not(.pwa-standalone) body.theme-light .dash-wrapper {
  height: var(--app-height);
  max-height: var(--app-height);
}

body.theme-light .top-bar {
  color: var(--text-muted);
}

body.theme-light .icon-small {
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.85);
}

body.theme-light .icon-small.active {
  background: #395aff;
  border-color: #395aff;
  color: #ffffff;
}

body.theme-light .live-location-card {
  border-color: var(--border-soft);
  -webkit-backdrop-filter: blur(var(--card-blur));
  backdrop-filter: blur(var(--card-blur));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transform-origin: center center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-light .live-location-info {
  background: rgba(255, 255, 255, 0.86);
}

body.theme-light .live-location-info-top {
  background: rgb(237 237 237 / 92%);
}

body.theme-light .live-location-chip,
body.theme-light .live-location-ship-name {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
}

body.theme-light .live-location-ship-icon {
  color: #395aff;
}

body.theme-light .live-location-temp,
body.theme-light .live-location-route-item strong,
body.theme-light .live-location-stat strong,
body.theme-light .live-location-total strong {
  color: var(--text-main);
}

body.theme-light .live-location-weather,
body.theme-light .live-location-weather-icon {
  color: #395aff;
}

body.theme-light .live-location-route-item span,
body.theme-light .live-location-stat .label,
body.theme-light .live-location-total .label {
  color: var(--text-muted);
}

body.theme-light .tile {
  border-color: var(--border-soft);
  -webkit-backdrop-filter: blur(var(--card-blur));
  backdrop-filter: blur(var(--card-blur));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.5);
  transform-origin: center center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-light .tile.subtle {
  background: rgba(255, 255, 255, 0.5);
}

body.theme-light .tile-icon {
  color: var(--text-muted);
}

body.theme-light .tile-icon i.ri-arrow-right-line {
  color: #395aff;
}

/* Lottie secondary gray: #b4b4b4 → #848484 */
body.theme-light:not(.page-order-cargo) .tile-lottie svg path.secondary,
body.theme-light:not(.page-order-cargo) .tile-lottie svg .secondary,
body.theme-light:not(.page-order-cargo) .ent-cat-lottie svg path.secondary,
body.theme-light:not(.page-order-cargo) .ent-cat-lottie svg .secondary {
  stroke: #848484 !important;
}

body.theme-light:not(.page-order-cargo) .tile-lottie svg [stroke="#b4b4b4"],
body.theme-light:not(.page-order-cargo) .tile-lottie svg [stroke="rgb(180, 180, 180)"],
body.theme-light:not(.page-order-cargo) .tile-lottie svg [stroke="rgb(180,180,180)"],
body.theme-light:not(.page-order-cargo) .ent-cat-lottie svg [stroke="#b4b4b4"],
body.theme-light:not(.page-order-cargo) .ent-cat-lottie svg [stroke="rgb(180, 180, 180)"],
body.theme-light:not(.page-order-cargo) .ent-cat-lottie svg [stroke="rgb(180,180,180)"] {
  stroke: #848484 !important;
}

body.theme-light:not(.page-order-cargo) .tile-lottie svg [fill="#b4b4b4"],
body.theme-light:not(.page-order-cargo) .tile-lottie svg [fill="rgb(180, 180, 180)"],
body.theme-light:not(.page-order-cargo) .tile-lottie svg [fill="rgb(180,180,180)"],
body.theme-light:not(.page-order-cargo) .ent-cat-lottie svg [fill="#b4b4b4"],
body.theme-light:not(.page-order-cargo) .ent-cat-lottie svg [fill="rgb(180, 180, 180)"],
body.theme-light:not(.page-order-cargo) .ent-cat-lottie svg [fill="rgb(180,180,180)"] {
  fill: #848484 !important;
}

body.theme-light .tile:hover .tile-svg-icon i,
body.theme-light .tile:hover .tile-icon i,
body.theme-light .resto-card:hover .tile-svg-icon i {
  color: #395aff;
}

/* Izinkan shadow hover tampil di semua sisi (tidak terpotong overflow) */
body.theme-light .main,
body.theme-light .left-col,
body.theme-light .mid-col,
body.theme-light .right-col,
body.theme-light .left-grid,
body.theme-light .mid-stack,
body.theme-light .right-grid {
  overflow: visible;
}

body.theme-light .tile:hover,
body.theme-light .live-location-card:hover,
body.theme-light .resto-card:hover {
  /* /* transform: scale(1.05); */ */
  overflow: visible;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 28px rgba(57, 90, 255, 0.42);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-light .announcement-card:hover {
  /* transform: scale(1.05); */
  overflow: hidden;
  position: relative;
  z-index: 2;
  border-radius: var(--radius-md);
  box-shadow: 0 0 28px rgba(57, 90, 255, 0.42);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-light .live-location-card:hover {
  overflow: hidden;
}

body.theme-light .left-col,
body.theme-light .mid-col {
  grid-template-rows: minmax(0, 1.4fr) minmax(0, 1.6fr);
}

body.theme-light .mid-col-spacer {
  min-height: 0;
}

/* Layout mid-stack: PELNI Mart (atas) + Resto & Cafe (bawah) */
body.theme-light .mid-stack {
  justify-content: flex-end;
  gap: 12px;
  min-height: 0;
  height: 100%;
}

body.theme-light .mid-stack > .tile {
  flex: 0 0 auto;
  align-self: start;
  width: calc((100% - 12px) / 2);
  height: calc((100% - 12px) / 2);
  min-height: 0;
  box-sizing: border-box;
}

body.theme-light .mid-stack > .resto-card {
  flex: 0 0 auto;
  width: 100%;
  height: calc((100% - 12px) / 2);
  min-height: 0;
  min-width: 0;
  align-self: stretch;
  box-sizing: border-box;
  overflow: hidden;
}

/* Satu baris left-grid = setengah tinggi kolom layanan */
body.theme-light .left-grid {
  grid-template-rows: 1fr 1fr;
  min-height: 0;
}

body.theme-light .left-grid .tile.tile-span-2 {
  height: 100%;
  min-height: 0;
}

body.theme-light .resto-card {
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(var(--card-blur));
  backdrop-filter: blur(var(--card-blur));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  border: 1px solid var(--border-soft);
  transform-origin: center center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-light #restoSlider,
body.theme-light .resto-slider {
  min-height: 0;
  min-width: 0;
  flex: 1 1 auto;
}


/* Kolom kanan: grid sama seperti mid-col (atas kosong, bawah = card berita) */
body.theme-light .right-col {
  display: grid;
  grid-template-rows: 1.4fr 1.6fr;
  gap: 15px;
  min-height: 0;
  background: none;
  background-image: none;
  border: none;
  padding: 0;
  overflow: visible;
  justify-content: stretch;
  box-shadow: none;
  transform: none;
  transition: none;
}

/* Hover child tidak boleh menggerakkan kolom / grid saudara */
body.theme-light .right-col:hover {
  transform: none;
  box-shadow: none;
  transition: none;
}

body.theme-light .right-grid {
  gap: 12px;
  min-height: 0;
  overflow: visible;
  isolation: isolate;
}

body.theme-light .right-grid > .tile {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  justify-self: stretch;
  z-index: 0;
}

body.theme-light .right-grid > .tile:hover {
  /* transform: scale(1.05); */
  z-index: 3;
  overflow: visible;
  box-shadow: 0 0 28px rgba(57, 90, 255, 0.42);
}

/* Ukuran & gaya selaras dengan card Resto & Cafe */
body.theme-light .announcement-card {
  --overlay-bottom-start: 60%;
  position: relative;
  min-height: 0;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  transform-origin: center center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-light .announcement-card .right-badge {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 1;
}

body.theme-light .announcement-card .announcement-slider {
  min-height: unset;
}

body.theme-light .announcement-card .tile-main,
body.theme-light .announcement-card .caption-label {
  color: var(--text-main);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

body.theme-light .announcement-card .caption-date {
  color: var(--primary);
  text-shadow: none;
}

body.theme-light .announcement-card .title-pengumuman {
  display: block;
  color: var(--text-main);
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
  line-height: 20px;
  cursor: pointer;
  transition: color 0.2s ease;
}

body.theme-light .announcement-card .title-pengumuman:hover {
  color: #395aff;
}

body.theme-light .bottom-left-text .bottom-left-brand {
  color: #395aff;
}

body.theme-light .bottom-right-text .brand {
  color: var(--text-main);
}

body.theme-light .temp-pill {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--border-soft);
  color: var(--text-main);
}

body.theme-light .port-tooltip-inner {
  background-color: #ffffff;
  border-color: var(--border-soft);
  color: var(--text-main);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

body.theme-light .device-guard-overlay {
  background: rgba(255, 255, 255, 0.72);
}

body.theme-light .device-guard-content {
  color: var(--text-main);
  border-color: var(--border-soft);
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

body.theme-light .device-guard-message {
  color: var(--text-muted);
}

@media screen and (max-width: 1180px) {
  body.theme-light #restoSlider,
  body.theme-light .resto-slider {
    min-height: 0;
  }

  body.theme-light .right-col {
    gap: 12px;
  }

  body.theme-light .announcement-card {
    padding: 10px 14px;
  }

  body.theme-light .announcement-card .right-badge {
    top: 10px;
    left: 14px;
    right: 14px;
  }
}
