/* local_reader.css: styles for reading your own files, the files view and the "Your files" row */

/* ===== files view ===== */

/* the view sits above the footer like the home page content */
.local_view { position: relative; z-index: 2; padding: 32px var(--gutter) 56px; }

/* keep the text column readable on wide screens */
.local_view_inner { max-width: 1100px; margin: 0 auto; }

/* small red label above the heading */
.local_kicker { margin: 0 0 6px; color: var(--seal); font-weight: 700; font-size: 14px; }

/* big heading in the display font */
.local_heading { margin: 0 0 12px; font-family: var(--font_display); font-weight: 400; font-size: clamp(28px, 4vw, 44px); line-height: 1.1; }

/* the explanation under the heading */
.local_lead { margin: 0 0 24px; max-width: 640px; color: var(--muted); line-height: 1.6; }

/* the dashed box people can drop files on */
.local_drop {
  /* stack the text and buttons */
  display: grid;
  /* center everything */
  justify-items: center;
  /* space between lines */
  gap: 8px;
  /* roomy inside */
  padding: 36px 20px;
  /* dashed outline that says drop here */
  border: 2px dashed var(--rule);
  /* rounded corners */
  border-radius: var(--radius_large);
  /* slightly raised background */
  background: var(--panel);
  /* center the text */
  text-align: center;
  /* smooth highlight */
  transition: border-color 0.15s ease, background 0.15s ease;
}

/* red outline while a file is dragged over or the box has focus */
.local_drop.is_over, .local_drop:focus-visible { border-color: var(--seal); background: var(--panel_raised); outline: none; }

/* the main line in the drop box */
.local_drop_title { margin: 0; font-weight: 700; font-size: 18px; }

/* the small line in the drop box */
.local_drop_sub { margin: 0; color: var(--muted); font-size: 14px; }

/* the two buttons in the drop box */
.local_drop_actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }

/* the heading above the recent list lines up with the column, not the page gutter */
.local_recent_title { margin: 36px 0 14px; }

/* grid of recent files in the view */
.local_recent_list { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card_width), 1fr)); gap: 22px 14px; }

/* cards in the view grid fill their cell */
.local_recent_list .local_card_wrap { width: 100%; }

/* the empty message spans the grid without the page gutter */
.local_empty { grid-column: 1 / -1; margin: 0; }

/* ===== cards ===== */

/* wrapper that holds a recent card and its forget button */
.local_card_wrap { flex: 0 0 var(--card_width); display: grid; gap: 6px; align-content: start; }

/* the card inside a wrapper fills it */
.local_card_wrap .card { width: 100%; flex: none; }

/* placeholder cover when no small picture was saved */
.local_cover_placeholder { display: grid; place-items: center; height: 100%; font-size: 44px; color: var(--seal); }

/* the small forget link under a card in the view */
.local_forget { justify-self: start; background: none; border: 0; padding: 2px 0; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; }

/* forget link turns light on hover */
.local_forget:hover, .local_forget:focus-visible { color: var(--paper); }

/* the "Read your own files" tile is a link that looks like a card */
.local_open_tile { color: inherit; text-decoration: none; display: block; }

/* the tile frame shows a dashed border instead of a cover */
.local_open_tile .card_cover_wrap { display: grid; place-content: center; justify-items: center; gap: 8px; padding: 12px; text-align: center; border: 2px dashed var(--rule); background: var(--panel); }

/* the big plus sign in the tile */
.local_tile_plus { font-size: 42px; line-height: 1; color: var(--seal); }

/* the small text in the tile */
.local_tile_text { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* the nav link for the files view when it is showing */
.nav_links a[aria-current] { color: var(--paper); }

/* ===== reader for local files ===== */

/* pages waiting to be drawn keep a portrait shape so the strip has height */
.local_reader .reader_page:not([src]) { aspect-ratio: 5 / 7; min-height: 0; }

/* a page that could not be read shows a dim block */
.local_reader .reader_page[data-state="broken"] { opacity: 0.35; }

/* pages waiting in paged modes do not collapse the stage */
.local_reader .reader_paged_page:not([src]) { aspect-ratio: 5 / 7; background: var(--color_panel); }
