/* The Insurance Purity Test — global styles
   Most styling is applied inline (ported verbatim from the design) to keep
   pixel fidelity. This file holds resets, keyframes, and the hover behaviours
   that the original expressed via the design tool's `style-hover` attribute. */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: #f7f4ec;
  color: #26241f;
  font-family: Geist, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
a { color: inherit; }
button { font-family: inherit; }

@keyframes ipt-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ipt-stamp { from { opacity: 0; transform: rotate(-6deg) scale(1.4); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
::selection { background: #b23a3022; }

/* ---- hover behaviours (ported from `style-hover`) ---- */
.ipt-row:hover { background: rgba(0, 0, 0, 0.045); }
.ipt-clear:hover { color: #7a7461 !important; border-bottom-color: #cbc4b2 !important; }
.ipt-calc:hover { transform: translateY(-1px); filter: brightness(1.05); }
.ipt-primary:hover { filter: brightness(0.94); }
.ipt-secondary:hover { filter: brightness(1.06); }
.ipt-sheet-btn:hover { background: #f2ede2 !important; }
.ipt-sheet-copy:hover { filter: brightness(0.96); }
.ipt-link:hover { opacity: 0.7; }

/* ---- entrance ---- */
.ipt-result-content { animation: ipt-fade 0.5s ease both; }

/* ---- share sheet (bottom sheet on mobile, centered modal on desktop) ---- */
@keyframes ipt-overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ipt-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes ipt-sheet-pop { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }

.ipt-sheet-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(20, 18, 15, 0.6);
  display: flex; align-items: flex-end; justify-content: center;
  animation: ipt-overlay-in 0.2s ease both;
}
.ipt-sheet-panel {
  width: 100%; max-width: 420px;
  max-height: 90vh; overflow-y: auto;
  background: #fbf8f1;
  border-radius: 22px 22px 0 0;
  padding: 18px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.28);
  animation: ipt-sheet-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@media (min-width: 640px) {
  .ipt-sheet-overlay { align-items: center; }
  .ipt-sheet-panel {
    border-radius: 22px;
    padding: 24px 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
    animation: ipt-sheet-pop 0.2s ease both;
  }
  .ipt-sheet-handle { display: none; }
}

/* respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .ipt-result-content,
  .ipt-sheet-overlay,
  .ipt-sheet-panel { animation: none; }
  * { scroll-behavior: auto !important; }
}
