/* Cookie banner and settings (Website Cookie Consent V1).
   One stylesheet for the shop and for promotion pages. It is self-contained on purpose: the shop's Tailwind build is
   not touched, and the same file draws the same banner on both. Brand values are the shop's own (#1f9d57 family,
   6px radius, Hanken Grotesk inherited from the page). No animation: a consent control should simply be there.
   Contrast, measured: white on #15703d 6.15:1, #15703d on white 6.15:1, #47504c on white 8.33:1, #69726e on white 4.96:1,
   the off switch track #767d79 on white 4.22:1 (3:1 needed for non-text). */

.cc, .ccp { --cc-brand: #1f9d57; --cc-brand-d: #15703d; --cc-brand-dd: #0f5e32; --cc-soft: #ebf6ef;
      --cc-ink: #1b2220; --cc-ink-2: #47504c; --cc-ink-3: #69726e; --cc-line: #e1e4e0; --cc-off: #767d79; --cc-radius: 6px;
      font-family: inherit; color: var(--cc-ink); }
.ccp *, .ccp *::before, .ccp *::after { box-sizing: border-box; }
.ccp :focus-visible { outline: 3px solid var(--cc-brand-dd); outline-offset: 2px; }
.cc *, .cc *::before, .cc *::after { box-sizing: border-box; }
.cc [hidden] { display: none !important; }
.cc :focus-visible, .cc-link:focus-visible { outline: 3px solid var(--cc-brand-dd, #0f5e32); outline-offset: 2px; }
.cc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html.cc-lock { overflow: hidden; }
body.cc-pad { padding-bottom: var(--cc-h, 0px); }

/* ── Buttons: Accept all and Necessary only are the same size, weight and height ── */
.cc-btn { font-family: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.2; min-height: 44px; padding: 0 18px; border-radius: var(--cc-radius);
          border: 2px solid var(--cc-brand-d); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.cc-btn-solid { background: var(--cc-brand-d); color: #fff; }
.cc-btn-solid:hover { background: var(--cc-brand-dd); border-color: var(--cc-brand-dd); }
.cc-btn-line { background: #fff; color: var(--cc-brand-d); }
.cc-btn-line:hover { background: var(--cc-soft); }
.cc-btn-text { border-color: transparent; background: transparent; color: var(--cc-brand-dd); text-decoration: underline; text-underline-offset: 3px; padding: 0 10px; }
.cc-btn-text:hover { background: var(--cc-soft); }

/* Footer link ("Cookie settings"): a button that reads as a link, with a full-size tap area. */
.cc-link { font: inherit; color: inherit; background: none; border: 0; padding: 0 2px; margin: 0; min-height: 44px; cursor: pointer;
           text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; }
.cc-link:hover { color: var(--cc-brand-dd, #0f5e32); }

/* ── Bottom banner ── */
.cc-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #fff; border-top: 1px solid var(--cc-line);
             box-shadow: 0 -6px 20px rgba(27, 34, 32, .10); max-height: 75vh; max-height: 75dvh; overflow-y: auto;
             padding-bottom: env(safe-area-inset-bottom); }
.cc-banner-in { max-width: 1160px; margin: 0 auto; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 32px; align-items: center; }
.cc-banner h2 { margin: 0 0 4px; font-size: 16px; line-height: 1.3; font-weight: 700; }
.cc-banner p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--cc-ink-2); max-width: 70ch; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }

/* The shop has a fixed tab bar on phones (58px). The banner sits above it so it never hides the navigation. */
@media (max-width: 640px) {
  .cc[data-cc-context="store"] .cc-banner { bottom: calc(58px + env(safe-area-inset-bottom)); padding-bottom: 0; }
}
@media (max-width: 700px) {
  .cc-banner-in { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; gap: 10px; }
  .cc-banner h2 { font-size: 15px; margin-bottom: 2px; }
  .cc-banner p { font-size: 13.5px; line-height: 1.45; }
  .cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .cc-actions .cc-btn-text { grid-column: 1 / -1; }
}

/* ── Settings dialog: a bottom sheet on phones, centred on wider screens ── */
.cc-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(27, 34, 32, .55); display: flex; align-items: flex-end; justify-content: center; }
.cc-dialog { background: #fff; width: 100%; max-width: 620px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; border-radius: 10px 10px 0 0;
             padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); outline: none; -webkit-overflow-scrolling: touch; }
@media (min-width: 700px) { .cc-overlay { align-items: center; padding: 24px; } .cc-dialog { border-radius: 8px; padding: 22px 24px; max-height: 88vh; } }
.cc-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-dialog h2 { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 700; }
.cc-close { flex: none; width: 44px; height: 44px; margin-right: -10px; border: 0; border-radius: var(--cc-radius); background: transparent; color: var(--cc-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cc-close:hover { background: var(--cc-soft); }
.cc-lead { margin: 6px 0 14px; font-size: 14px; line-height: 1.55; color: var(--cc-ink-2); }
.cc a { color: var(--cc-brand-d); text-underline-offset: 3px; }

.cc-group { border-top: 1px solid var(--cc-line); padding: 14px 0; }
.cc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cc-row h3 { margin: 0 0 3px; font-size: 15px; font-weight: 700; line-height: 1.3; }
.cc-row p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--cc-ink-2); }
.cc-always { flex: none; font-size: 13px; font-weight: 700; color: var(--cc-brand-dd); padding-top: 2px; white-space: nowrap; }

.cc-list { margin: 10px 0 0; padding: 0; }
.cc-list > div { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 4px 14px; padding: 7px 0; border-top: 1px dashed var(--cc-line); font-size: 13px; line-height: 1.5; }
.cc-list dt { font-weight: 600; color: var(--cc-ink); overflow-wrap: anywhere; }
.cc-list dd { margin: 0; color: var(--cc-ink-2); }
.cc-list code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: #f1f3ef; padding: 1px 5px; border-radius: 3px; }
@media (max-width: 520px) { .cc-list > div { grid-template-columns: minmax(0, 1fr); } }

/* Switch: a real checkbox (role="switch"), so keyboard, screen reader and touch all work. State is also written as text. */
.cc-switch { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cc-switch-ui { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--cc-off); flex: none; }
.cc-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.cc-switch input:checked + .cc-switch-ui { background: var(--cc-brand-d); }
.cc-switch input:checked + .cc-switch-ui::after { left: 21px; }
.cc-switch input:focus-visible + .cc-switch-ui { outline: 3px solid var(--cc-brand-dd); outline-offset: 2px; }
.cc-switch-state { min-width: 22px; font-size: 13px; font-weight: 700; color: var(--cc-ink-2); }

.cc-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 14px; border-top: 1px solid var(--cc-line); }
@media (max-width: 700px) { .cc-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; } .cc-dialog-actions .cc-btn-solid:only-child { grid-column: 1 / -1; } }

@media (forced-colors: active) {
  .cc-banner, .cc-dialog { border: 2px solid CanvasText; }
  .cc-switch-ui { border: 2px solid ButtonText; }
}

/* ── Cookie Policy page (/cookie-policy): one readable column, English then Bahasa Malaysia ── */
.ccp { padding: 20px 16px 56px; }
.ccp-card { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--cc-line); border-radius: 8px; padding: 22px 20px; line-height: 1.65; }
@media (min-width: 700px) { .ccp { padding: 32px 16px 72px; } .ccp-card { padding: 32px 36px; } }
.ccp-lang { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.ccp-lang a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 2px solid var(--cc-brand-d); border-radius: var(--cc-radius); font-size: 14px; font-weight: 600; color: var(--cc-brand-d); text-decoration: none; }
.ccp-lang a:hover { background: var(--cc-soft); }
.ccp h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.2; font-weight: 800; }
.ccp h2 { margin: 26px 0 6px; font-size: 18px; line-height: 1.3; font-weight: 700; }
.ccp p, .ccp li { font-size: 15px; color: var(--cc-ink-2); margin: 0 0 10px; }
.ccp ul { margin: 0 0 10px; padding-left: 20px; }
.ccp li { margin-bottom: 6px; }
.ccp-date { font-size: 13px; color: var(--cc-ink-3); }
.ccp a { color: var(--cc-brand-d); text-underline-offset: 3px; }
.ccp-rule { border: 0; border-top: 2px solid var(--cc-line); margin: 36px 0; }
.ccp section { scroll-margin-top: 80px; }
