/* Screen styles for PasteSharePrint. Print styles come from Gutenberg + print.css. */
:root {
  --ink: #1f2328;
  --muted: #6b7280;
  --paper: #ffffff;
  --desk: #e9e5dc;
  --line: #d9d4c7;
  --accent: #b5412f;
  --accent-ink: #ffffff;
  --pro: #7c3aed;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { font-family: var(--font); color: var(--ink); background: var(--desk); }
body { margin: 0; line-height: 1.5; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; }

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .75rem 1.5rem; background: var(--paper); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand-mark { color: var(--accent); font-family: Georgia, serif; }
.site-header nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-header nav a { color: var(--ink); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.5rem; color: var(--muted); font-size: .85rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 1rem 1.5rem; }
.hero { text-align: center; margin: 1rem 0 2rem; }
.hero h1 { margin: 0 0 .25rem; font-size: 2rem; }
.lede { color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card.narrow { max-width: 460px; margin: 2rem auto; }
.card h1 { margin-top: 0; font-size: 1.4rem; }

.btn {
  display: inline-block; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; line-height: 1.3;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(.92); border-color: var(--accent); }
.btn-danger { color: #b91c1c; }
.btn-small { padding: .3rem .7rem; font-size: .9rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-disabled { opacity: .6; cursor: default; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
form.inline { display: inline; }
.plan-badge { font-size: .75rem; padding: .15rem .5rem; border-radius: 99px; background: #eee; text-transform: uppercase; letter-spacing: .04em; }
.plan-badge.plan-pro { background: var(--pro); color: #fff; }
.tag { font-size: .7rem; padding: .1rem .4rem; border-radius: 99px; background: #eee; text-transform: uppercase; }

.messages { max-width: 1100px; margin: 1rem auto 0; padding: 0 1.5rem; }
.msg { padding: .6rem .9rem; border-radius: var(--radius); margin-bottom: .5rem; background: #fff7e6; border: 1px solid #f3d79b; }
.msg-success { background: #ecfdf3; border-color: #a7e3bd; }
.msg-error { background: #fef2f2; border-color: #f5b5b5; }
.msg ul { margin: 0; padding-left: 1.2rem; }

/* Paste form */
.paste-form { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .paste-form { grid-template-columns: 1fr; } }
.field { margin-bottom: .9rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .25rem; }
.field small { display: block; color: var(--muted); font-size: .78rem; margin-top: .2rem; }
.field input[type=text], .field input[type=password], .field input[type=email], .field select, .field textarea {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--paper);
}
.field textarea { font-family: var(--mono); font-size: .9rem; line-height: 1.45; min-height: 380px; resize: vertical; }
.field .errorlist, .error { color: #b91c1c; font-size: .85rem; list-style: none; padding: 0; margin: .25rem 0 0; }
.field-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: .3rem; gap: 1rem; }
#byte-count.over { color: #b91c1c; font-weight: 700; }
.form-side { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.plan-box { margin-top: 1rem; padding: .75rem; background: #faf8f3; border: 1px dashed var(--line); border-radius: var(--radius); font-size: .85rem; }
.plan-box ul { margin: .4rem 0; padding-left: 1.1rem; }
.plan-box.inline-box { margin: 0; }
.tips { margin-top: 2.5rem; color: var(--muted); font-size: .9rem; }
.tips code { font-family: var(--mono); background: #f3f1ea; padding: .1rem .3rem; border-radius: 3px; }

/* Toolbar above a paste */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar-info { display: flex; flex-direction: column; }
.toolbar-info .muted { font-size: .85rem; }
.toolbar-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.print-bar { display: flex; justify-content: center; align-items: center; gap: .75rem; padding: .75rem; background: var(--paper); border-bottom: 1px solid var(--line); font-size: .9rem; }

@media screen {
/* Paper: typography shared by the fallback sheet and the paginated preview pages.
   Mirrors Gutenberg's base rules so the preview breaks lines where the print does. */
.paper { color: #000; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.paper.theme-modern { font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; text-align: justify; }
.paper.theme-modern h1, .paper.theme-modern h2, .paper.theme-modern h3, .paper.theme-modern h4 { font-family: "Montserrat", "Arial Black", "Helvetica Neue", Helvetica, sans-serif; }
.paper.theme-modern h1 { font-weight: 700; letter-spacing: -1px; text-align: center; }
.paper.theme-modern h2 { letter-spacing: -1px; }
.paper.theme-modern pre, .paper.theme-modern code, .paper.theme-modern blockquote { background: #f8f8f9; border: 0; }
.paper.theme-oldstyle { font-family: Georgia, "Times New Roman", Times, serif; text-align: justify; }
.paper.theme-oldstyle h1, .paper.theme-oldstyle h2, .paper.theme-oldstyle h3 { font-family: "Crimson Text", Baskerville, Garamond, "Times New Roman", serif; }
.paper.theme-oldstyle h1 { text-align: center; }
.paper.theme-oldstyle pre { border: 1px solid #000; }
.paper h1, .paper h2, .paper h3, .paper h4, .paper h5, .paper h6 { color: #000; line-height: 1.2; margin: 0 0 .75rem; }
.paper h1 { font-size: 2.5rem; } .paper h2 { font-size: 2rem; } .paper h3 { font-size: 1.75rem; }
.paper h4 { font-size: 1.5rem; } .paper h5 { font-size: 1.25rem; } .paper h6 { font-size: 1rem; }
.paper p, .paper blockquote, .paper table, .paper ul, .paper ol, .paper dl { margin: 0 0 1.5rem; }
.paper a { color: #000; }
.paper pre, .paper code, .paper kbd { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 85%; }
.paper pre { border: 1px solid #bbb; padding: 10px 12px; margin: 0 0 1.5rem; white-space: pre-wrap; word-break: break-word; }
.paper pre.plain { border: 0; padding: 0; }
.paper .codehilite { background: #f6f6f6; margin: 0 0 1.5rem; }
.paper .codehilite pre { margin: 0; border: 0; background: transparent; }
.paper .linenos { color: #999; user-select: none; }
.paper table { border-collapse: collapse; width: 100%; }
.paper th, .paper td { border-bottom: 1px solid #000; padding: 8px 16px; text-align: left; }
.paper blockquote { padding-left: 1em; border-left: 3px solid #ccc; }
.paper img { max-width: 100%; }
.paper .print-header { font-family: var(--font); font-size: 9pt; color: #555; border-bottom: 1px solid #ccc; padding-bottom: 2mm; margin-bottom: 6mm; text-align: left; }
.paper .print-footer { font-family: var(--font); font-size: 8pt; color: #777; border-top: 1px solid #ddd; padding-top: 2mm; margin-top: 6mm; text-align: left; }
.paper .print-footer .branding { float: right; }
.paper .paste-title { margin-top: 0; }
.paper .no-print { display: none; }

}

/* Paper sizes (used by both the sheet and the generated pages). */
.paper { --page-w: 210mm; --page-h: 297mm; }
.paper.paper-letter { --page-w: 216mm; --page-h: 279mm; }
.paper.paper-legal { --page-w: 216mm; --page-h: 356mm; }
.paper.paper-a5 { --page-w: 148mm; --page-h: 210mm; }

/* Fallback sheet (no JS, or narrow screens): one continuous sheet. */
.sheet { background: var(--paper); margin: 0 auto 2rem; padding: 2cm 1.8cm; width: var(--page-w); max-width: 100%; min-height: var(--page-h); box-shadow: 0 2px 14px rgba(0,0,0,.18); border-radius: 2px; }
.sheet .print-frame { width: 100%; border-collapse: collapse; margin: 0; }
.sheet .print-frame > * > tr > td { border: 0; padding: 0; vertical-align: top; }
.sheet.paginated { display: none; }

/* Paginated preview: one box per printed page. */
.pages { display: flex; flex-direction: column; align-items: center; gap: 10mm; margin: 0 auto 2rem; }
.page {
  position: relative; display: flex; flex-direction: column; box-sizing: border-box; overflow: hidden;
  width: var(--page-w); height: var(--page-h); padding: 2cm 1.8cm; max-width: 100%;
  background: var(--paper); box-shadow: 0 2px 14px rgba(0,0,0,.18); border-radius: 2px;
}
.page-content { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.page .print-header { flex: 0 0 auto; }
.page .print-footer { flex: 0 0 auto; }
/* Mirrors the @bottom-right page-margin box printed by _print_head.html. */
.page-label {
  position: absolute; right: 1.8cm; top: calc(var(--page-h) - 2cm + 4mm);
  font: 8pt Helvetica, Arial, sans-serif; color: #666;
}
@media (max-width: 700px) { .sheet { padding: 8mm 6mm; min-height: 0; } }

/* Share row */
.share { display: flex; align-items: center; justify-content: center; gap: .4rem; flex-wrap: wrap; margin: 0 0 2rem; font-size: .85rem; }
.share-label { color: var(--muted); margin-right: .25rem; }
.share-btn { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; }
.share-btn:hover { border-color: var(--ink); }
.share-x:hover { border-color: #000; } .share-facebook:hover { border-color: #1877f2; color: #1877f2; }
.share-linkedin:hover { border-color: #0a66c2; color: #0a66c2; } .share-reddit:hover { border-color: #ff4500; color: #ff4500; }
.share-whatsapp:hover { border-color: #25d366; color: #128c7e; }

/* API keys + docs */
.key-reveal { border-color: #a7e3bd; background: #ecfdf3; margin-bottom: 1.5rem; }
.key-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .5rem 0; }
.key-row code { font-family: var(--mono); font-size: .95rem; background: #fff; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); overflow-wrap: anywhere; }
.key-form { margin-top: 1.5rem; max-width: 460px; }
.snippet { font-family: var(--mono); font-size: .85rem; background: #2b2b2b; color: #f3f1ea; padding: .9rem 1rem; border-radius: var(--radius); overflow-x: auto; white-space: pre; }
.docs { max-width: 900px; margin: 0 auto; }
.docs h2 { margin-top: 2.5rem; }
.docs table { margin-bottom: 1rem; }
.docs code { font-family: var(--mono); font-size: .9em; background: #f3f1ea; padding: .1rem .3rem; border-radius: 3px; }
.docs pre code, .snippet code { background: none; padding: 0; }

/* Legal + account */
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.legal h2 { font-size: 1.2rem; margin-top: 2rem; }
.legal table { font-size: .9rem; }
.legal .card { margin: 1rem 0 2rem; }
.report-link { text-align: center; font-size: .8rem; margin: -1.5rem 0 2rem; }
.report-link a { color: var(--muted); }
.small { font-size: .85rem; }
.field label input[type=checkbox] { margin-right: .4rem; }

.error-page { text-align: center; }
.error-code { font-size: 3rem; font-weight: 700; color: var(--accent); line-height: 1; }

/* Folders */
.folders-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 800px) { .folders-layout { grid-template-columns: 1fr; } }
.folders { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.folders h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .5rem; }
.folder-list { list-style: none; margin: 0 0 .75rem; padding: 0; }
.folder-list li a { display: flex; justify-content: space-between; padding: .35rem .5rem; border-radius: 4px; color: var(--ink); text-decoration: none; }
.folder-list li a:hover { background: #f3f1ea; }
.folder-list li.active a { background: #f3f1ea; font-weight: 600; }
.folder-list .count { color: var(--muted); font-size: .8rem; }
.folder-form { display: flex; gap: .4rem; margin-bottom: .5rem; }
.folder-form input { flex: 1; min-width: 0; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }
.folder-manage { font-size: .85rem; margin-top: .75rem; } .folder-manage summary { cursor: pointer; color: var(--muted); margin-bottom: .5rem; }
.folder-title { margin: 0 0 .75rem; font-size: 1.1rem; }
.move-form select { font: inherit; font-size: .85rem; padding: .2rem .3rem; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); max-width: 140px; }
.field-check label { font-weight: 600; display: flex; align-items: center; gap: .4rem; }

/* Lists / tables */
.paste-list, .compare { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.paste-list th, .paste-list td, .compare th, .compare td { padding: .55rem .75rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .92rem; }
.paste-list th, .compare th { background: #faf8f3; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.paste-list .actions { white-space: nowrap; }
.paste-list .actions a, .paste-list .actions button { margin-right: .5rem; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }

/* Pricing: content sits on a white panel like the paste form, for the same contrast. */
.pricing-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; max-width: 1000px; margin: 0 auto 2rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin: 0 0 1.5rem; }
.plan-card { background: #faf8f3; border: 1px solid #cfc9bb; border-radius: var(--radius); padding: 1.5rem; text-align: center; display: flex; flex-direction: column; }
.plan-card-pro { background: #fff; border-color: var(--pro); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.plan-card h2 { margin: 0; }
.plan-card .price { font-size: 2rem; font-weight: 700; margin: .5rem 0 0; }
.plan-card .price-alt { font-size: .95rem; color: var(--ink); margin-bottom: .25rem; }
.tag-save { background: var(--pro); color: #fff; }
.plan-desc { font-size: .92rem; color: var(--ink); margin: .75rem 0 1rem; flex: 1; }
.checkout-options { display: flex; flex-direction: column; gap: .5rem; }
.btn-disabled { opacity: 1; background: #f3f1ea; color: var(--muted); border-style: dashed; cursor: default; }
.dev-toggle { margin-top: .75rem; font-size: .8rem; }
.compare { margin: 0; border-color: #cfc9bb; }
.compare th, .compare td { font-size: .95rem; color: var(--ink); border-color: #e2ddd0; }
.compare th { color: #4b5563; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare th:nth-child(4), .compare td:nth-child(4) { background: rgba(124,58,237,.06); }
.pricing-note { margin: 1rem 0 0; }
