/* /resources only (17 Oct 2026): file previews, thank-you panel with the
   Google review ask, the one-time review reminder, the preview window.
   Loads after styles.css so the card rules here win. */

/* Cards: preview picture on the left, words on the right */
.res-card { display: grid; grid-template-columns: 112px 1fr; gap: 22px; align-items: start; }
.res-body { display: flex; flex-direction: column; gap: 10px; min-height: 100%; }
.res-thumb {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 4px;
  background: #fff; overflow: hidden; cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(26,15,46,0.14), 0 8px 22px rgba(26,15,46,0.12);
  transition: transform .2s cubic-bezier(0.23,1,0.32,1), box-shadow .2s ease-out;
}
.res-thumb img { display: block; width: 100%; height: auto; }
@media (hover: hover) and (pointer: fine) { .res-thumb:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(26,15,46,0.14), 0 14px 30px rgba(26,15,46,0.18); } }
.res-thumb:focus-visible { outline: 2px solid var(--royal); outline-offset: 3px; }
.res-thumb-label {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
  background: rgba(45,27,78,0.88); color: var(--cream); padding: 4px 10px; border-radius: 100px;
}
/* Phones: picture beside the tag and title only; the description and buttons get the full width */
@media (max-width: 480px) {
  .res-card { grid-template-columns: 84px 1fr; grid-template-rows: auto 1fr auto auto;
    grid-template-areas: "thumb tag" "thumb title" "desc desc" "links links";
    column-gap: 16px; row-gap: 10px; padding: 20px 18px 18px; }
  .res-body { display: contents; }
  .res-thumb { grid-area: thumb; }
  .res-tag { grid-area: tag; }
  .res-card h3 { grid-area: title; align-self: start; }
  .res-card p { grid-area: desc; }
  .res-links { grid-area: links; flex-wrap: wrap; }
}

/* Thank-you panel: files on the left, the review ask on the right */
.res-thanks { display: none; grid-template-columns: 1fr 1.15fr; gap: 20px; margin-top: 4px; }
.res-thanks.show { display: grid; }
.res-thanks-files, .res-thanks-review { border-radius: 18px; padding: 32px; display: flex; flex-direction: column; align-items: flex-start; }
.res-thanks .btn { margin-top: auto; }
.res-thanks-files { background: var(--cream-dim); border: 1px solid rgba(45,27,78,0.12); color: var(--aubergine); }
.res-thanks-review { background: var(--aubergine); color: var(--cream); }
.res-thanks h2 { font-size: 26px; margin: 0 0 10px; font-weight: 400; color: inherit; }
.res-thanks p { margin: 0 0 20px; line-height: 1.6; }
.res-thanks-files p { color: var(--slate); }
.res-thanks-review p { color: rgba(248,245,240,0.86); }
.res-thanks-custom { grid-column: 1 / -1; margin: 4px 0 0; font-size: 15px; color: var(--slate); }
.res-thanks-custom a { color: var(--royal); font-weight: 600; }
.res-thanks-custom a[href^="tel:"] { white-space: nowrap; }
.res-thanks-review :focus-visible { outline-color: var(--lilac); }
@media (max-width: 900px) { .res-thanks.show { grid-template-columns: 1fr; } .res-thanks-files, .res-thanks-review { padding: 26px 20px; } }

/* One-time reminder after the first download */
.res-nudge {
  position: fixed; left: 22px; bottom: 22px; z-index: 97; width: 360px; max-width: calc(100vw - 32px);
  background: var(--cream); color: var(--ink); border: 1px solid rgba(45,27,78,0.14); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(26,15,46,0.28); padding: 18px 52px 18px 20px;
  opacity: 0; transform: translateY(12px);
  transition: opacity .24s ease-out, transform .24s cubic-bezier(0.23,1,0.32,1);
}
.res-nudge.show { opacity: 1; transform: none; }
.res-nudge[hidden] { display: none; }
.res-nudge p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; font-weight: 600; color: var(--aubergine); }
.res-nudge-x, .res-preview-x {
  position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.res-nudge-x { background: none; color: var(--slate); }
.res-nudge-x:hover { background: rgba(45,27,78,0.08); }
@media (max-width: 760px) { .res-nudge { left: 8px; right: 8px; width: auto; max-width: none; bottom: calc(var(--qb-h, 68px) + 76px); } }

/* Preview window: the whole first page fits the screen */
.res-preview { margin: auto; padding: 0; border: 0; border-radius: 14px; background: #fff; max-width: none; max-height: none; overflow: hidden; box-shadow: 0 30px 80px rgba(26,15,46,0.45); }
.res-preview::backdrop { background: rgba(26,15,46,0.62); }
.res-preview img { display: block; height: auto; aspect-ratio: 1100 / 1557; width: min(calc(100vw - 32px), calc((100vh - 110px) * 0.7065), 640px); }
.res-preview-cap { margin: 0; padding: 12px 18px 14px; font-size: 14px; color: var(--slate); border-top: 1px solid rgba(45,27,78,0.10); max-width: min(calc(100vw - 32px), 640px); }
.res-preview-x { background: rgba(45,27,78,0.88); color: var(--cream); z-index: 1; }
.res-nudge-x:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; }
.res-preview-x:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--royal); }
html:has(.res-preview[open]) { overflow: hidden; scrollbar-gutter: stable; }
.res-preview img { background: var(--cream-dim) center / cover no-repeat; }
.res-preview[open] { animation: resPop .22s cubic-bezier(0.23,1,0.32,1); }
.res-preview[open]::backdrop { animation: resFade .22s ease-out; }
@keyframes resPop { from { opacity: 0; transform: scale(.97); } }
@keyframes resFade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .res-thumb, .res-nudge { transition: none; }
  .res-thumb:hover { transform: none; }
  .res-nudge { transform: none; }
  .res-preview[open] { animation: resFade .22s ease-out; }
}

/* The form: air between the two intro paragraphs and above the button,
   even field spacing once the pairs stack, no iPhone zoom on tap */
.res-gate-text p + p { margin-top: 12px; }
.res-gate .dh-ask-fine { margin: 0 0 16px; }
.res-gate .field-row { row-gap: 0; }
@media (max-width: 760px) { .res-gate input, .res-gate select { font-size: 16px; } }
