/* * NUSANTARA SUPER APP - CUSTOM STYLES (FINAL NO-GAP + TYPOGRAPHY EDITION)
 * * Upgrade goals:
 * 1) CRITICAL FIX: Menghapus gap putih di atas header mobile.
 * 2) Reset Brutal: Memastikan html & body menempel viewport.
 * 3) Typography Restore: Mengembalikan gaya Bold/Italic/List pada artikel.
 */

/* =========================
   0. RESET BRUTAL (CRITICAL FIX GAP)
   Wajib paling atas dan pakai !important
========================= */
html {
  margin-top: 0 !important;
  padding-top: 0 !important;
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8fafc; /* Slate-50 */
  -webkit-tap-highlight-color: transparent;
  
  /* Mencegah efek tarik-turun (bounce) di iOS yang bikin gap */
  overscroll-behavior-y: none;
}

/* Sembunyikan Admin Bar fisik jika masih nongol */
#wpadminbar {
  display: none !important;
}

/* =========================
   1. ALPINE.JS UTILITIES
========================= */
[x-cloak] {
  display: none !important;
}

/* =========================
   2. NATIVE APP FEEL (SCROLLBAR)
========================= */
/* Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
/* IE, Edge and Firefox */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* =========================
   3. PAYWALL / SMART LOCK
========================= */
.nsa-paywall-wrapper {
  position: relative;
  overflow: hidden;
}

.nsa-paywall-blur {
  mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  filter: blur(2px);
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
}

.nsa-paywall-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.9) 40%,
    rgba(255, 255, 255, 1) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2rem;
  z-index: 10;
}

/* =========================
   4. CUSTOM ANIMATIONS
========================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-zoom-in {
  animation: zoomIn 0.2s ease-out forwards;
}

/* =========================
   5. ADMIN CONSOLE SPECIFIC
========================= */
.nav-item-active {
  background-color: #dc2626; /* Brand Color */
  color: white;
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.4);
}

.nsa-table-container {
  overflow-x: auto;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* =========================
   6. FORM ELEMENTS
========================= */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Fix Input Zoom di iPhone (Wajib 16px) */
input, textarea, select {
  font-size: 16px !important; 
}

/* =========================
   7. UTILITY: SAFE AREA & LAYOUT
========================= */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom);
}

.nsa-app-shell {
  width: 100%;
  height: 100%;
}

/* =========================
   8. PRINT STYLES
========================= */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background-color: white;
  }
}

/* =========================================
   9. ARTICLE TYPOGRAPHY RESTORE (NEW FIX)
   Mengembalikan gaya Bold, Italic, Quote, dll
   yang hilang karena Tailwind Reset.
========================================= */

/* Paragraf & Text Dasar */
.prose p {
    margin-bottom: 1.25em;
    line-height: 1.8;
    color: #334155; /* Slate 700 */
}

/* Huruf Tebal (Bold) */
.prose strong, .prose b {
    font-weight: 800;
    color: #0f172a; /* Slate 900 */
}

/* Huruf Miring (Italic) */
.prose em, .prose i {
    font-style: italic;
}

/* Judul dalam Artikel (H2, H3, H4) */
.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #0f172a;
    font-weight: 800;
    line-height: 1.3;
}

.prose h2 {
    font-size: 1.5em;
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.prose h3 {
    font-size: 1.25em;
    margin-top: 1.5em;
    margin-bottom: 0.6em;
}

/* List (Bullet Points & Numbering) */
.prose ul {
    list-style-type: disc;
    padding-left: 1.6em;
    margin-bottom: 1.25em;
}

.prose ol {
    list-style-type: decimal;
    padding-left: 1.6em;
    margin-bottom: 1.25em;
}

.prose li {
    margin-bottom: 0.5em;
}

/* Kutipan (Blockquote) */
.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: #111827;
    border-left-width: 0.25rem;
    border-left-color: #dc2626; /* Merah Brand */
    background: #f1f5f9; /* Abu Terang */
    margin-top: 1.6em;
    margin-bottom: 1.6em;
    padding: 1em 1.25em;
    border-radius: 0 0.5rem 0.5rem 0;
    quotes: "\201C""\201D""\2018""\2019";
}

/* Link dalam Artikel */
.prose a {
    color: #dc2626;
    text-decoration: underline;
    font-weight: 600;
    text-underline-offset: 2px;
}

/* Gambar dalam Artikel */
.prose img {
    margin-top: 2em;
    margin-bottom: 2em;
    border-radius: 0.75rem;
    width: 100%;
    height: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Kode dalam Artikel */
.prose code {
    background-color: #f1f5f9;
    color: #0f172a;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-weight: 600;
}