/* public/styles/product-notice-popup.css
 * Gaya untuk pop up "WAJIB DIBACA!!" (scripts/product-notice-popup.js).
 * Hanya dipakai oleh public/pages/id.html.
 *
 * Aturan:
 *  - Semua selector berawalan .ng-notice (tidak menyentuh elemen halaman).
 *  - Warna memakai variabel tema dari <html style="..."> dengan fallback,
 *    jadi panel ikut gelap/terang sesuai tema tanpa warna hard-coded.
 *  - Animasi hanya opacity/transform, tidak ada layout shift maupun
 *    scrollbar horizontal.
 */
.ng-notice {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, .72);
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity .18s ease;
}

.ng-notice.is-visible {
  display: flex;
}

.ng-notice.is-open {
  opacity: 1;
}

.ng-notice__panel {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 22px 28px 24px;
  background: var(--bg-secondary, #1A222C);
  color: var(--text-primary, #f3f0f0);
  border: 1px solid var(--border-primary, #313c4c6b);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
  transform: translateY(8px) scale(.97);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}

.ng-notice.is-open .ng-notice__panel {
  transform: none;
}

@supports (height: 100dvh) {
  .ng-notice__panel {
    max-height: calc(100dvh - 32px);
  }
}

.ng-notice__title {
  margin: 0 0 16px;
  padding: 0 44px;
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: .02em;
  font-family: inherit;
}

.ng-notice__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  font-family: inherit;
}

.ng-notice__text + .ng-notice__text {
  margin-top: 20px;
}

.ng-notice__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, .85);
  background: transparent;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, border-color .15s ease;
}

.ng-notice__close:hover {
  background: var(--primary, #ff0000);
  border-color: var(--primary, #ff0000);
}

.ng-notice__close:focus-visible {
  background: var(--primary, #ff0000);
  border-color: var(--primary, #ff0000);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .ng-notice__panel {
    padding: 18px 16px 20px;
    border-radius: 14px;
  }

  .ng-notice__title {
    font-size: 15px;
    padding: 0 40px;
  }

  .ng-notice__text {
    font-size: 12.5px;
  }

  .ng-notice__close {
    width: 36px;
    height: 36px;
    top: 10px;
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ng-notice,
  .ng-notice__panel,
  .ng-notice__close {
    transition: none;
    animation: none;
  }

  .ng-notice.is-open .ng-notice__panel {
    transform: none;
  }
}

@media print {
  .ng-notice {
    display: none;
  }
}
