/* ==========================================================================
   Durianwin — popup "Daftar & Login" dan popup gambar promo.
   Dimuat di seluruh halaman dari /_astro/durianwin-popup-20261118.css.
   Semua kelas berawalan "dw-" agar tidak bentrok dengan gaya situs.
   ========================================================================== */

.dw-dock,
.dw-overlay {
  --dw-green: #1e7a46;
  --dw-green-dark: #12492d;
  --dw-green-deep: #0b2a1a;
  --dw-lime: #b7e34a;
  --dw-lime-dark: #7fbf1f;
  --dw-gold: #ffd15c;
  --dw-ink: #16241b;
  --dw-muted: #5c6a60;
  --dw-line: #dbe6d8;
  --dw-radius: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.dw-dock *,
.dw-overlay * {
  box-sizing: border-box;
}

.dw-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- dock ---- */

.dw-dock {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dw-dock__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 11px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(10, 38, 23, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.dw-dock__btn:active {
  transform: translateY(1px);
}

.dw-dock__btn--primary {
  background: linear-gradient(180deg, #c8ef63 0%, #96d02c 55%, #7fbf1f 100%);
  border-color: #8ec21f;
  color: #102c18;
}

.dw-dock__btn--primary:hover,
.dw-dock__btn--primary:focus-visible {
  background: linear-gradient(180deg, #d3f577 0%, #a2dc35 55%, #86c724 100%);
  box-shadow: 0 12px 28px rgba(10, 38, 23, 0.34);
}

.dw-dock__btn--ghost {
  background: #ffffff;
  border-color: #cfe0cb;
  color: var(--dw-green-dark);
}

.dw-dock__btn--ghost:hover,
.dw-dock__btn--ghost:focus-visible {
  background: #f2f9ee;
  border-color: #a9c8a2;
}

.dw-dock__icon {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
}

/* -------------------------------------------------------------- overlay ---- */

.dw-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 22, 14, 0.66);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: dw-fade 0.16s ease-out;
}

.dw-overlay[hidden] {
  display: none;
}

.dw-body-lock {
  overflow: hidden;
}

/* ---------------------------------------------------------------- kartu --- */

.dw-card {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 22px 20px;
  border-radius: 24px;
  background: #ffffff;
  color: var(--dw-ink);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  animation: dw-pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.dw-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #23362a;
  font-family: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.dw-close:hover {
  background: #ffffff;
  transform: scale(1.06);
}

/* ---------------------------------------------------------- popup daftar -- */

.dw-eyebrow {
  margin: 0 0 4px;
  color: var(--dw-green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dw-title {
  margin: 0 0 6px;
  padding-right: 34px;
  color: var(--dw-green-deep);
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1.25;
}

.dw-sub {
  margin: 0;
  color: var(--dw-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dw-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 16px 0 14px;
  padding: 5px;
  border-radius: 14px;
  background: #eef4ec;
}

.dw-tab {
  appearance: none;
  padding: 10px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--dw-muted);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.dw-tab[aria-selected="true"] {
  background: #ffffff;
  color: var(--dw-green-dark);
  box-shadow: 0 2px 8px rgba(14, 60, 34, 0.16);
}

.dw-panel[hidden] {
  display: none;
}

.dw-field {
  display: block;
  margin-bottom: 12px;
}

.dw-field > span {
  display: block;
  margin-bottom: 5px;
  color: #3c4a40;
  font-size: 0.81rem;
  font-weight: 700;
}

.dw-field input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1.5px solid var(--dw-line);
  border-radius: 12px;
  background: #fbfdf9;
  color: var(--dw-ink);
  font-family: inherit;
  font-size: 0.97rem;
  line-height: 1.3;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.dw-field input::placeholder {
  color: #9aa79d;
}

.dw-field input:focus {
  outline: none;
  border-color: var(--dw-green);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(30, 122, 70, 0.16);
}

.dw-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.dw-btn:active {
  transform: translateY(1px);
}

.dw-btn--primary {
  background: linear-gradient(180deg, #c8ef63 0%, #96d02c 55%, #7fbf1f 100%);
  color: #102c18;
  box-shadow: 0 10px 20px rgba(31, 94, 44, 0.24);
}

.dw-btn--primary:hover,
.dw-btn--primary:focus-visible {
  background: linear-gradient(180deg, #d3f577 0%, #a2dc35 55%, #86c724 100%);
}

.dw-btn--outline {
  margin-top: 8px;
  border: 1.5px solid var(--dw-line);
  background: #ffffff;
  color: var(--dw-green-dark);
}

.dw-btn--outline:hover,
.dw-btn--outline:focus-visible {
  background: #f4faf0;
  border-color: #a9c8a2;
}

.dw-note {
  margin: 12px 0 0;
  color: #7c8a80;
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: center;
}

.dw-note a {
  color: var(--dw-green);
  word-break: break-word;
}

.dw-switch {
  margin: 14px 0 0;
  color: var(--dw-muted);
  font-size: 0.86rem;
  text-align: center;
}

.dw-switch button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--dw-green);
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.dw-status {
  margin: 10px 0 0;
  color: var(--dw-green-dark);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.dw-status[hidden] {
  display: none;
}

/* --------------------------------------------------------- popup gambar --- */

.dw-card--promo {
  width: min(400px, 100%);
  padding: 14px 14px 18px;
  background: linear-gradient(180deg, #0f3320 0%, #0a2416 100%);
  color: #ffffff;
}

.dw-promo__media {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #0a2416;
  box-shadow: inset 0 0 0 2px rgba(255, 209, 92, 0.35);
}

.dw-promo__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(48vh, 400px);
  object-fit: cover;
  object-position: center 45%;
}

.dw-promo__body {
  padding: 16px 6px 0;
}

.dw-card--promo .dw-eyebrow {
  color: var(--dw-gold);
  text-align: center;
}

.dw-card--promo .dw-title {
  padding-right: 0;
  color: #ffffff;
  font-size: 1.28rem;
  text-align: center;
}

.dw-card--promo .dw-sub {
  color: #c6dcc9;
  text-align: center;
}

.dw-card--promo .dw-btn--primary {
  margin-top: 14px;
  min-height: 52px;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 26px rgba(127, 191, 31, 0.34);
}

.dw-card--promo .dw-btn--outline {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.dw-card--promo .dw-btn--outline:hover {
  background: rgba(255, 255, 255, 0.14);
}

.dw-card--promo .dw-note {
  color: #9fb8a5;
}

.dw-card--promo .dw-note a {
  color: var(--dw-gold);
}

.dw-card--promo .dw-close {
  background: rgba(9, 30, 19, 0.72);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.dw-card--promo .dw-close:hover {
  background: rgba(9, 30, 19, 0.9);
}

/* ----------------------------------------------------------- animasi ------ */

@keyframes dw-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dw-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ----------------------------------------------------------- responsif ---- */

@media (max-width: 600px) {
  .dw-dock {
    right: 10px;
    left: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }

  .dw-dock__btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 10px;
    font-size: 0.93rem;
  }

  .dw-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .dw-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 22px 18px 18px;
    border-radius: 22px;
  }

  .dw-card--promo {
    padding: 12px 12px 16px;
  }

  .dw-promo__media img {
    max-height: 40vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dw-overlay,
  .dw-card,
  .dw-dock__btn,
  .dw-btn {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .dw-dock,
  .dw-overlay {
    display: none !important;
  }
}
