/* ============================================================
   EASYFORMAPPLY - HAND-CRAFTED ORGANIC STYLESHEET
   Natural paper texture, hand-drawn wobbly ink lines, and
   tactile cyber cafe stationery aesthetic.
   ============================================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Kalam:wght@400;700&family=Patrick+Hand&family=Outfit:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root {
  --color-parchment: #FAF5EA;
  --color-parchment-light: #FFFDF9;
  --color-parchment-warm: #FAF0DC;
  --color-parchment-border: #D6C8AF;
  --color-ink: #28221D;
  --color-ink-light: #4E443B;
  --color-ink-muted: #7B6F63;
  --color-terracotta: #D78252;
  --color-terracotta-dark: #BF6B3D;
  --color-forest: #264D3B;
  --color-forest-hover: #1B3A2C;
  --color-forest-light: #3C6B55;
  --color-accent-blue: #7AA8DF;
  --color-accent-yellow: #F5C252;
  --color-accent-purple: #B89EE8;
  --color-accent-pink: #F4A8B8;
  --shadow-ink: 3px 3px 0px #28221D;
  --shadow-ink-sm: 2px 2px 0px #28221D;
  --shadow-ink-md: 4px 4px 0px #28221D;
  --shadow-ink-lg: 6px 6px 0px #28221D;
}

/* Base Body with authentic warm paper texture */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background-color: var(--color-parchment);
  color: var(--color-ink);
  background-image: 
    radial-gradient(rgba(40, 34, 29, 0.08) 0.6px, transparent 0.6px),
    radial-gradient(rgba(196, 182, 158, 0.45) 0.5px, transparent 0.5px);
  background-size: 24px 24px, 12px 12px;
  background-position: 0 0, 12px 12px;
  font-family: 'Patrick Hand', 'Kalam', cursive, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Remove default disclosure triangle on iOS / WebKit for FAQ summaries */
summary::-webkit-details-marker {
  display: none;
}
summary {
  list-style: none;
}


/* Organic Hand-Drawn Wobbly Borders */
.wobbly-box {
  border: 2px solid var(--color-ink);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
}

.wobbly-card {
  border: 2px solid var(--color-ink);
  border-radius: 24px 20px 26px 22px;
  background-color: var(--color-parchment);
}

.wobbly-card-white {
  border: 2px solid var(--color-ink);
  border-radius: 24px 20px 26px 22px;
  background-color: var(--color-parchment-light);
}

.wobbly-btn {
  border: 2px solid var(--color-ink);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: var(--shadow-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.wobbly-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-ink-md);
}

.wobbly-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--color-ink) !important;
}

/* Dotted leader for price rows: Clean, aligned, without baseline displacement */
.price-leader {
  flex: 1;
  border-bottom: 2px dotted #C4B69E;
  margin: 0 8px;
  height: 0;
  min-width: 12px;
  align-self: center;
}

/* Stamped Stamp Badge look */
.postage-stamp {
  border: 2px dashed var(--color-ink);
  background: #FFFDF9;
  position: relative;
}

.postage-stamp::after {
  content: "OFFICIAL";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  font-family: 'Courier Prime', monospace;
  font-weight: bold;
  font-size: 14px;
  color: rgba(215, 130, 82, 0.18);
  pointer-events: none;
}

/* Security Sandboxed Document Viewer with Watermark */
.secure-watermark {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(40, 34, 29, 0.035),
    rgba(40, 34, 29, 0.035) 20px,
    transparent 20px,
    transparent 40px
  );
  user-select: none;
  -webkit-user-select: none;
}

/* Blur protection for screen capture defense */
.screenshot-protect {
  transition: filter 0.2s ease, opacity 0.2s ease;
}

/* Clipboard Wooden Board Clip */
.clipboard-clip {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 24px;
  background: #8B5738;
  border: 2px solid var(--color-ink);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.clipboard-clip::after {
  content: "";
  width: 45px;
  height: 8px;
  background: #FAF5EA;
  border: 1px solid var(--color-ink);
  border-radius: 3px;
}

/* Hand cursor animation */
@keyframes bounceHand {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-6px);
  }
}

.hand-cursor-indicator {
  animation: bounceHand 1.4s ease-in-out infinite;
}

/* Custom Scrollbars in Ink */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #FAF5EA;
  border-left: 1px solid #D6C8AF;
}

::-webkit-scrollbar-thumb {
  background: #D78252;
  border: 1.5px solid #28221D;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #BF6B3D;
}

/* Confidential Diagonal Watermark Overlay */
.confidential-watermark-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.confidential-watermark-text {
  position: absolute;
  font-family: 'Courier Prime', monospace;
  font-size: 1.15rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.16);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  transform: rotate(-30deg);
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}

/* Secure Document Viewer Anti-Copy */
.secure-doc-viewer {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}

.secure-doc-viewer img,
.secure-doc-viewer iframe {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
  pointer-events: auto;
}

/* Anti-Print Protection except for Receipt modal */
@media print {
  body * {
    visibility: hidden !important;
  }
  #agentDetailSecureCanvas,
  #visualDocPhotoViewport,
  #agentLightboxRenderContainer,
  #adminLightboxRenderContainer,
  .secure-doc-viewer {
    display: none !important;
    visibility: hidden !important;
  }
  #receiptModal, #receiptModal * {
    visibility: visible !important;
  }
  #receiptModal {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    background: white !important;
    box-shadow: none !important;
    border: 2px solid black !important;
  }
  #receiptModal button {
    display: none !important;
  }
}

/* Mobile Navigation Drawer Transitions */
#mobileNavDrawer {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileNavDrawer.open {
  transform: translateX(0);
}

#mobileNavDrawer.closed {
  transform: translateX(-100%);
}
