#exportOverlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: stretch;
  background: var(--overlay);
}
#exportOverlay:not([hidden]) {
  display: flex;
}

/* Narrower than the step panel (500px, styles.css) on purpose: the step
   panel's edge stays visible through the overlay, which says "this lies on
   top of the plan". */
#exportPanel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 420px;
  background: var(--bg);
}
#exportPanel .scrollContainer {
  width: 100%;
  padding: 16px 20px 50px 20px;
}
#exportRoomSettings,
#exportGuestListSettings,
#exportCoverPageSettings,
#exportTablePagesSettings {
  padding-left: 24px;
}

#exportPanelHeader {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The option groups are segmented controls (styles.css); this only spaces
   them under their labels. */
.exportButtonsRow {
  margin-top: 8px;
}

/* PDF or guests' page: two tabs across the panel, since the choice swaps out
   the whole panel and the preview rather than setting an option. The active
   one is underlined; the verbs (Export PDF, Publish) stay on the buttons
   that do those things. */
.exportTabs {
  display: flex;
  margin-top: 24px;
  border-bottom: 1px solid var(--border);
}
.exportTab {
  flex: 1;
  padding: 10px 0 12px;
  margin-bottom: -1px;
  font-size: 0.8rem;
  line-height: 1.12rem;
  color: var(--textMuted);
  background: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.exportTab:hover {
  color: var(--text);
}
.exportTab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--strong);
  cursor: default;
}

#exportPanelBody {
  padding-bottom: 32px;
}
/* Both have display rules of their own, which would win over [hidden]. */
#exportPages[hidden],
#guestPagePreview[hidden] {
  display: none;
}
/* The chart and header options serve both modes (index.php, #exportOptions):
   what only paper has goes in share mode, and the plain headings that stand
   in for the PDF's on/off switches show only there. */
#exportPanel.shareMode .pdfOnly,
#exportPanel:not(.shareMode) .shareOnly {
  display: none;
}
#exportOptions h3.shareOnly {
  margin: 0;
}
/* Room for breath between the share controls and the options below them. */
#exportPanel.shareMode #exportOptions {
  margin-top: 24px;
  /* The guests' page is titled before it is drawn: the title and subtitle
     come before the room here. The PDF keeps the paper's order. */
  display: flex;
  flex-direction: column;
}
#exportPanel.shareMode #exportHeaderGroup {
  order: -1;
}
#exportPanel.shareMode #exportRoomGroup {
  margin-top: 24px;
}
#exportPanelBody input[type="checkbox"]:disabled + label {
  color: var(--textDisabled);
}

#exportPreviewContainer {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 60px;
  overflow-y: auto;
}

#exportPages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.exportPage {
  width: 100%;
  flex-shrink: 0;
  aspect-ratio: 210 / 297;
  box-shadow: 0px 4px 16px 2px #0002;
  background: white;
}
.exportPage.landscape {
  aspect-ratio: 297 / 210;
}
.exportPage svg {
  display: block;
  width: 100%;
  height: 100%;
}

#exportButton {
  display: flex;
  align-items: center;
  justify-content: center;
}
.payInfoContainer {
  width: 100%;
  padding: 24px 20px 36px 20px;
  border-top: 1px solid var(--border);
}
.payInfoContainer .button-big-gold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.purchaseConsentRow {
  align-items: flex-start;
  width: auto;
  margin: 0 0 16px;
  font-size: 0.85rem;
  line-height: 1.3rem;
  color: var(--textMuted);
}
.purchaseConsentRow[hidden] {
  display: none;
}
.purchaseConsentRow .checkboxIcon {
  margin-top: 2px;
}
.purchaseConsentRow a {
  color: inherit;
  text-decoration: underline;
}
.payInfoContainer .button-big-gold {
  width: 100%;
}
#exportPaywallStatus,
#sharePayStatus {
  margin-bottom: 16px;
}
/* The payment line in the share section once the footer has gone (share.ts). */
.shareStatus {
  margin: 0 0 12px;
}

/* --- Share with guests (share.ts) --- */
.shareRooms {
  margin-top: 12px;
}
.shareRooms .checkboxRow {
  margin: 6px 0;
}
#shareChooseRoom {
  color: var(--red);
}
.shareLinkRow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}
.shareLinkRow input {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
}
.shareOpenLink {
  display: inline-block;
  font-size: 0.8rem;
  margin-bottom: 12px;
  color: var(--accentDark);
}
/* The image carries its own white quiet zone (share.ts); the box adds the
   frame. */
.shareQrCode {
  width: 176px;
  height: 176px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 4px 0 8px 0;
}
.shareQrCode img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.shareChanges {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--accentLight);
}
/* The text line only — not the <p> inside the button below it. */
#shareChangesText {
  margin: 0 0 8px 0;
}
#shareSection .button-small-tertiary {
  padding-left: 0;
}

/* The guests' page preview: the real page (seat/index.php) in a phone,
   as tall as the preview area allows. */
#guestPagePreview {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 0;
}
