/*
 * Static-site adjustements.
 *
 * The exported library is read-only, except for community Import: there is
 * no server to accept a star, an edit or a delete, so those controls are
 * hidden rather than left to fail with a 404. The one-photo Import overlay
 * stays because uploads go to the community Worker API (see community.js),
 * and the Yours tab lists what the community has shared. The batch and
 * QR-card import routes need the Django app, so their links
 * (.import-modal__more) stay hidden.
 *
 * Connect camera stays, and so does Send to camera: both run entirely in the
 * browser over WebUSB and read pre-rendered files (the client config and the
 * per-recipe payloads), so the camera flow works with no server behind it.
 * The connect dialog shares the .import-modal class with the import dialogs,
 * which is why only the import overlays are hidden — never the class itself.
 * The slot overlay stays visible too: the browser-driven Send to camera builds
 * its spinner, slot picker and result cards into #slot-overlay. Only the
 * server-rendered slot picker is gone, and the static pages never render its
 * hx-get buttons, so nothing dead is exposed.
 *
 * Loaded only by `manage.py export_static_site` output.
 */

.fav-btn,
.recipe-card__cta .recipe-card__send[hx-get],
#import-overlay,
.import-modal__more,
.create-recipes-wrap,
.delete-confirm,
#delete-recipes-btn,
.ms-actions-dropdown {
  display: none !important;
}

/* The explorer's full-detail overlay is only ever filled by an HTMX swap, and
   the static pages have no server to swap from. On a recipe page the same id
   is the page itself, so the rule is scoped to the library rather than applied
   to every exported page — hiding it there left every recipe URL blank. */
.site-page--library #recipe-detail-overlay {
  display: none !important;
}

/* The recipe sheet is full-viewport in the app. On the published site it sits
   below the top bar instead, so the wordmark still leads home from a recipe a
   visitor landed on directly. Both heights are fixed: this page's bar carries
   no search row, so it is 72px, or 64px below the mobile breakpoint. */
.site-page--recipe #recipe-detail-overlay {
  top: 72px;
}

@media (max-width: 900px) {
  .site-page--recipe #recipe-detail-overlay {
    top: 64px;
  }
}

/* Controls only the Django app can answer. Each one would 404 or post into
   nothing here, so none of them is offered. */
.site-page--recipe .detail-close,
.site-page--recipe .name-recipe-btn,
.site-page--recipe .action-btn[hx-get*="/card/partial/"],
.site-page--recipe .action-btn[hx-get*="/move-version-line/"],
.site-page--recipe [href^="/images/?recipe_id="],
.site-page--recipe [href^="/recipes/graph/"],
.site-page--recipe [href$="/create-version/"],
.site-page--recipe #dist-sheet,
.site-page--recipe [data-open-sheet="dist-sheet"] {
  display: none !important;
}

/* A recipe page shows what it is; nothing here can change it. */
.recipe-detail__actions .edit-recipe-btn,
.edit-recipe-btn,
[href$="/edit/"],
[data-camera-push][disabled] {
  display: none !important;
}
