/* ==========================================================================
   funparuay-widgets — Theme CSS
   โทนดำ-แดง สไตล์ "ตรายางใบหวย" ใช้ร่วมกันทุก Widget
   ========================================================================== */

@font-face {
  font-family: 'FP Kanit';
  src: url('../fonts/Kanit-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'FP Kanit';
  src: url('../fonts/Kanit-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'FP Kanit';
  src: url('../fonts/Kanit-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'FP Kanit';
  src: url('../fonts/Kanit-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'FP Sarabun';
  src: url('../fonts/Sarabun-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'FP Sarabun';
  src: url('../fonts/Sarabun-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'FP Sarabun';
  src: url('../fonts/Sarabun-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'FP Sarabun';
  src: url('../fonts/Sarabun-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --fp-ink: #0a090c;
  --fp-ink-soft: #120f13;
  --fp-panel: #18141a;
  --fp-panel-line: #2a2229;

  --fp-stamp: #c81e2c;
  --fp-stamp-bright: #e8482f;
  --fp-stamp-deep: #7d1018;

  --fp-gold: #d9a86a;
  --fp-gold-soft: #f0d9ad;

  --fp-paper: #ede7da;
  --fp-paper-dim: #a89e92;
  --fp-paper-faint: #6f6862;
}

/* Scope resets to our widgets only — never touch the rest of the site */
.fp-widget {
  font-family: 'FP Sarabun', sans-serif;
  color: var(--fp-paper);
  box-sizing: border-box;
}
.fp-widget *,
.fp-widget *::before,
.fp-widget *::after {
  box-sizing: border-box;
}
.fp-widget h1, .fp-widget h2, .fp-widget h3, .fp-widget h4 {
  font-family: 'FP Kanit', sans-serif;
  margin: 0;
}
.fp-widget p { margin: 0; }
.fp-widget a { text-decoration: none; }
.fp-widget img { max-width: 100%; display: block; }

.fp-eyebrow {
  font-family: 'FP Kanit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fp-stamp-bright);
}

.fp-section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--fp-paper);
  margin-top: 4px;
}
@media (min-width: 768px) {
  .fp-section-title { font-size: 32px; }
}

.fp-section-desc {
  margin-top: 8px;
  max-width: 640px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--fp-paper-dim);
}

.fp-panel {
  background: rgba(24, 20, 26, 0.6);
  border: 1px solid var(--fp-panel-line);
  border-radius: 16px;
  padding: 20px;
}

.fp-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 16px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--fp-paper-faint);
}

/* ---- Stamp chip: the page's signature number badge ---- */
.fp-stamp-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'FP Kanit', sans-serif;
  font-weight: 700;
  color: var(--fp-paper);
  background: linear-gradient(155deg, var(--fp-panel) 0%, var(--fp-ink-soft) 100%);
  border: 1.5px solid var(--fp-stamp);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 1px rgba(200, 30, 44, 0.15),
    0 0 0 3px rgba(200, 30, 44, 0.06);
}
.fp-stamp-chip::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(200, 30, 44, 0.35);
  border-radius: 7px;
  pointer-events: none;
}
.fp-stamp-chip--hot {
  border-color: var(--fp-stamp-bright);
  background: linear-gradient(155deg, rgba(232, 72, 47, 0.18) 0%, var(--fp-ink-soft) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(232, 72, 47, 0.25),
    0 0 18px rgba(232, 72, 47, 0.25);
}
.fp-stamp-chip--cold {
  border-color: var(--fp-panel-line);
  color: var(--fp-paper-dim);
}
.fp-stamp-chip--gold {
  border-color: var(--fp-gold);
  background: linear-gradient(155deg, rgba(217, 168, 106, 0.16) 0%, var(--fp-ink-soft) 100%);
}

.fp-grain {
  position: relative;
}
.fp-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  border-radius: inherit;
}

.fp-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fp-panel-line) 20%, var(--fp-panel-line) 80%, transparent);
}

.fp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 24px;
  font-family: 'FP Kanit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s ease;
}
.fp-btn:hover { transform: scale(1.02); }
.fp-btn--primary {
  background: var(--fp-stamp);
  color: var(--fp-paper);
  box-shadow: 0 0 24px rgba(200, 30, 44, 0.4);
}
.fp-btn--outline {
  border: 1px solid var(--fp-panel-line);
  color: var(--fp-paper);
}
.fp-btn--outline:hover { border-color: var(--fp-gold); color: var(--fp-gold-soft); }

@media (prefers-reduced-motion: reduce) {
  .fp-widget * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
