/* =========================================================================
   Azur Promilia — consent page
   Theme follows the official site (az-official/css/style.css):
   dark header gradient, paper / ink / gold palette, Noto Sans + Serif, Cinzel
   ========================================================================= */
:root {
  --serif: "Noto Serif", "Noto Serif Thai", "Noto Serif SC", Georgia, serif;
  --sans: "Noto Sans", "Noto Sans Thai", "Noto Sans SC", sans-serif;
  --display: "Cinzel", var(--serif);

  --paper: #eaebe0;
  --paper-2: #f3f3ec;
  --ink: #4b4943;
  --ink-strong: #2f2d29;
  --ink-soft: #9e9c97;
  --gold: #ceb684;
  --gold-soft: rgba(206, 182, 132, .45);
  --night: #111;
  --glass: rgba(10, 12, 18, .94);
  --glow: #38a4ff;

  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: #fff;
  background: var(--night);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; }

/* ---------- Header ---------- */
.header {
  height: var(--header-h);
  background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .3) 60%, rgba(0, 0, 0, 0));
  transition: background-color .3s;
}
.header.is-scrolled { background-color: rgba(10, 12, 18, .9); }
.header__inner { height: 100%; padding: 0 16px; }
@media (min-width: 992px) { .header__inner { padding: 0 48px; } }

/* pill buttons — same look as the official .lang_switch__toggle */
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 18px;
  background: rgba(0, 0, 0, .28);
  color: rgba(255, 255, 255, .85);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1;
  transition: color .3s, border-color .3s, background-color .3s;
}
.pill-btn:hover, .pill-btn:focus-visible, .pill-btn[aria-expanded="true"] {
  color: #fff;
  border-color: var(--gold);
  background: rgba(0, 0, 0, .55);
  outline: none;
}
.pill-btn.dropdown-toggle::after { margin-left: 2px; border-top-color: var(--gold); }
.flag { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); flex: none; }

.lang-pills {
  display: inline-flex;
  height: 36px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 18px;
  background: rgba(0, 0, 0, .28);
}
.lang-pills button {
  min-width: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 15px;
  background: none;
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  transition: color .2s, background-color .2s;
}
.lang-pills button:hover { color: #fff; }
.lang-pills button.active { background: var(--gold); color: var(--ink-strong); }

/* dropdown — same look as the official .lang_switch__list */
.country-menu {
  --bs-dropdown-bg: var(--glass);
  --bs-dropdown-border-color: var(--gold-soft);
  --bs-dropdown-border-radius: 10px;
  --bs-dropdown-link-color: rgba(255, 255, 255, .72);
  --bs-dropdown-link-hover-color: #fff;
  --bs-dropdown-link-hover-bg: rgba(206, 182, 132, .16);
  --bs-dropdown-link-active-color: var(--gold);
  --bs-dropdown-link-active-bg: transparent;
  --bs-dropdown-header-color: var(--ink-soft);
  min-width: 220px;
  padding: 5px;
  margin-top: 8px !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
}
.country-menu .dropdown-header { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px 4px; }
.country-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
}
.country-menu .dropdown-item.active { font-weight: 700; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 24px) 0 0;
  background:
    linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .15) 45%, rgba(17, 17, 17, .85) 88%, var(--night)),
    url(../img/hero_bg.jpg) 50% 35% / cover no-repeat;
}
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__logo {
  width: clamp(170px, 22vw, 228px);
  height: auto;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, .55));
  animation: fadeUp .8s .1s both;
}
.doc-tabs {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 2vw, 18px);
  width: 100%;
  margin-top: clamp(28px, 5vw, 56px);
  padding-bottom: 28px;
  animation: fadeUp .8s .25s both;
}
.doc-tab {
  position: relative;
  padding: 10px clamp(14px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 24px;
  background: rgba(0, 0, 0, .35);
  color: rgba(255, 255, 255, .78);
  font-family: var(--serif);
  font-size: clamp(14px, 1.2vw + 8px, 17px);
  font-weight: 700;
  line-height: 1.3;
  transition: color .3s, border-color .3s, background-color .3s, text-shadow .3s;
}
.doc-tab:hover { color: #fff; border-color: var(--gold); text-shadow: 0 0 4px var(--glow); }
.doc-tab.active {
  color: var(--ink-strong);
  background: var(--paper);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(206, 182, 132, .25), 0 6px 18px rgba(0, 0, 0, .35);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ---------- TOC ---------- */
.main { padding-bottom: 72px; }
.toc-wrap { position: sticky; top: calc(var(--header-h) + 12px); }
.toc-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  background: var(--glass);
  color: #fff;
  font-weight: 700;
}
.toc-toggle__ico {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg) translateY(-3px);
  transition: transform .25s;
}
.toc-toggle[aria-expanded="true"] .toc-toggle__ico { transform: rotate(-135deg) translateY(-3px); }
.toc-box {
  margin-top: 8px;
  padding: 14px 10px 14px 14px;
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  background: var(--glass);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(206, 182, 132, .5) transparent;
}
@media (min-width: 992px) {
  .toc-wrap { margin-top: 26px; }
  .toc-box { margin-top: 0; }
}
.toc-title {
  margin: 0 0 8px 8px;
  color: var(--gold);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
html:not([lang="en"]):not([lang="id"]):not([lang="vi"]) .toc-title { font-family: var(--serif); letter-spacing: .04em; }
.toc-list a {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: rgba(255, 255, 255, .66);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  transition: color .2s, background-color .2s;
}
.toc-list a:hover { color: #fff; background: rgba(206, 182, 132, .16); }
.toc-list a.active { color: var(--gold); font-weight: 700; }
.toc-list .lvl-2 a { padding-left: 20px; font-size: 12.5px; }

/* ---------- Paper document ---------- */
.paper {
  position: relative;
  margin: 26px 0 30px;
  padding: 28px 20px 32px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
/* torn paper edges from the official assets */
.paper::before, .paper::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.paper::before { top: -26px; height: 27px; background-image: url(../img/paper_top.png); }
.paper::after { bottom: -30px; height: 31px; background-image: url(../img/paper_bottom.png); }
@media (min-width: 768px) { .paper { padding: 40px 52px 48px; } }

.doc-loading { color: var(--ink-soft); font-size: 14px; }

.doc-head { text-align: center; margin-bottom: 28px; }
.doc-title {
  margin: 0 0 10px;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 1rem + 1.8vw, 2.1rem);
  font-weight: 700;
  line-height: 1.3;
}
.doc-meta { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; }
.doc-meta + .doc-meta { margin-top: 2px; color: #7b7870; font-size: 13px; font-weight: 400; }

/* decorative divider — same as the official .content_line */
.content_line { display: flex; align-items: center; gap: 4px; margin-top: 22px; color: var(--ink-soft); opacity: .7; }
.content_line .line { flex: 1; min-width: 0; height: 1px; background: currentColor; opacity: .6; }
.content_line .star {
  flex: none;
  width: 12px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
.content_line .star.big { width: 16px; height: 16px; background: var(--gold); }
.content_line .dot { display: flex; gap: 4px; }
.content_line .dot i { width: 2px; height: 2px; border-radius: 50%; background: currentColor; }

.doc-body { font-size: 15.5px; line-height: 1.8; overflow-wrap: anywhere; }
.doc-body strong { color: var(--ink-strong); }
.doc-h1, .doc-h2 { scroll-margin-top: calc(var(--header-h) + 16px); color: var(--ink-strong); font-family: var(--serif); }
.doc-h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(158, 156, 151, .45);
  font-size: 1.2rem;
  font-weight: 700;
}
.doc-h1::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background: var(--gold);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
.doc-body > .doc-h1:first-child { margin-top: 0; }
.doc-h2 { margin: 24px 0 10px; font-size: 1.05rem; font-weight: 700; }
.doc-p { margin: 0 0 10px; }
.doc-p.hang { padding-left: var(--ind); text-indent: calc(-1 * var(--hang)); }
.doc-p .tab { display: inline-block; width: var(--hang, 2em); text-indent: 0; }
.doc-list { margin: -2px 0 14px; padding-left: calc(34pt + 1.1rem); }
.doc-list li { margin-bottom: 4px; }
.doc-list li::marker { color: var(--gold); }

.doc-table { margin: 8px 0 20px; border: 1px solid #cacaca; border-radius: 15px 5px; background: #fff; }
.doc-table .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink);
  --bs-table-border-color: #e2e2da;
  font-size: 14px;
}
.doc-table .table > :not(caption) > * > * { padding: 10px 12px; }
.doc-table thead th { background: var(--gold); color: var(--ink-strong); border-bottom: 0; white-space: nowrap; }
.doc-table thead th strong { color: inherit; }
.doc-table tbody tr:nth-child(even) > * { background: var(--paper-2); }
.doc-table tr > :first-child { border-left: 0; }
.doc-table tr > :last-child { border-right: 0; }
.doc-table thead tr > * { border-top: 0; }
.doc-table tbody tr:last-child > * { border-bottom: 0; }

/* ---------- Footer ---------- */
.footer { padding: 28px 0 34px; background: #000; }
.footer__logos { --ci: 1; gap: calc(18px * var(--ci)); margin-bottom: 4px; }
.footer__ci { display: block; width: auto; }
.footer__ci--manjuu { height: calc(38px * var(--ci)); }
.footer__ci--pp { height: calc(38px * var(--ci)); }
.footer__ci--azur { height: calc(46px * var(--ci)); }
.footer__sep { width: 1px; height: calc(34px * var(--ci)); background: rgba(255, 255, 255, .55); flex: none; }
.footer__copy { color: rgba(255, 255, 255, .5); font-size: 12px; letter-spacing: -.2px; text-align: center; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  background: var(--glass);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, border-color .25s;
}
.to-top::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--gold);
  border-top: 2px solid var(--gold);
  transform: translate(-50%, -25%) rotate(45deg);
}
.to-top:hover { border-color: var(--gold); }
.to-top.show { opacity: 1; pointer-events: auto; }

@media (max-width: 575.98px) {
  .footer__logos { --ci: .66; }
  .header__inner { padding: 0 12px; }
  #countryName { display: none; }
  .doc-body { font-size: 15px; }
  .doc-p.hang { padding-left: calc(var(--ind) * .6); text-indent: calc(-.6 * var(--hang)); }
  .doc-p .tab { width: calc(var(--hang, 2em) * .6); }
  .doc-list { padding-left: 1.8rem; }
}

@media print {
  body { background: #fff; }
  .header, .hero, aside, .footer, .to-top { display: none !important; }
  .col-lg-9 { width: 100%; }
  .paper { box-shadow: none; padding: 0; background: #fff; }
  .paper::before, .paper::after { display: none; }
}
