/* The PDF frame (pdfview.js): our bar above Adobe's viewer, in normal flow, at a height set before Adobe loads.
   This file loads right after platform.css, before the page's own style and frame.css, so every rule except the
   section box names two classes and wins over the single class house rules that load later. */
:root{--fk-pdf-h:clamp(280px,calc(100dvh - 168px),1000px);--fk-pdf-workspace:#f5f5f5}
@media(max-width:650px){:root{--fk-pdf-h:clamp(360px,calc(100svh - 160px),640px)}}

.fk-pdf,.fk-pdf *{box-sizing:border-box}
.fk-pdf{display:flex;flex-direction:column;height:var(--fk-pdf-h);min-width:0;max-width:100%;border:1px solid var(--line,#e8e9e7);border-radius:12px;overflow:hidden;background:#fff;margin:0 0 22px}

/* the bar: part of our document, so a wheel over it scrolls the sheet */
.fk-pdf .fk-pdf-bar{position:relative;flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:4px 8px;min-height:53px;border-bottom:1px solid var(--line,#e8e9e7);background:#fff}
.fk-pdf .fk-pdf-tools{flex:0 1 auto;display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}
.fk-pdf .fk-pdf-tools .fk-versions{margin:0;padding:0}
.fk-pdf .fk-pdf-tools .tab{min-height:44px;display:inline-flex;align-items:center;padding:0 12px}
.fk-pdf .fk-pdf-tools .tab span{opacity:1}
/* a drawn select: WebKit's native one on the Mac keeps its own height and ignores min-height */
.fk-pdf .fk-pdf-tools select{-webkit-appearance:none;appearance:none;min-height:44px;max-width:100%;font:inherit;font-size:13px;color:var(--ink,#232527);border:1px solid var(--line,#e8e9e7);border-radius:8px;padding:0 34px 0 10px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b716d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center/16px 16px;cursor:pointer}
.fk-pdf .fk-pdf-label{font-size:12px;color:#5f6662;padding:0 6px}
/* a zero basis: the meta shrinks with an ellipsis and never pushes the bar onto a new row */
.fk-pdf .fk-pdf-meta{flex:1 1 0;min-width:0;margin:0;text-align:right;font-size:11px;color:#5f6662;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fk-pdf .fk-pdf-act{flex:none;display:flex;gap:8px}
.fk-pdf .fk-pdf-act .primary,.fk-pdf .fk-pdf-act .secondary,.fk-pdf .fk-pdf-act .fk-pdf-label{min-height:44px}
.fk-pdf .fk-pdf-act .fk-pdf-label{display:inline-flex;align-items:center}
.fk-pdf .fk-pdf-own{flex:none;display:flex;gap:8px}
.fk-pdf .fk-pdf-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:0;gap:0}
.fk-pdf .fk-pdf-btn svg{width:18px;height:18px}
.fk-pdf .fk-pdf-btn[aria-disabled="true"]{opacity:.55}
/* the house ring sits 4px out; in the bar's 4px padding the frame's rounded clip would cut it, so it sits 1px out */
.fk-pdf .fk-pdf-bar :focus-visible{outline-offset:1px}
/* the bytes could not load: our icons keep their place, so the bar keeps its height */
.fk-pdf[data-pdf-nobytes] .fk-pdf-own{visibility:hidden}
.fk-pdf .fk-pdf-skip{display:inline-flex;align-items:center;min-height:44px;padding:0 10px;font-size:13px;color:var(--ink,#232527);text-decoration:underline;text-underline-offset:3px}
.fk-pdf .fk-pdf-skip:not(:focus-visible){position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* the body: the state layer and the stage share one cell; the stage comes later, so it paints over the state */
.fk-pdf .fk-pdf-body{flex:1 1 auto;min-height:0;display:grid;background:var(--fk-pdf-workspace)}
.fk-pdf .fk-pdf-state,.fk-pdf .fk-pdf-stage{grid-area:1/1;min-width:0;min-height:0}
.fk-pdf .fk-pdf-state{overflow:auto;padding:28px 24px;color:#4f5652;font-size:13px;line-height:1.6}
/* a state box that scrolls takes focus (fit in pdfview.js): the house ring, inset so the frame's clip keeps it whole */
.fk-pdf .fk-pdf-state:focus-visible{outline:2px solid #4b5b6a;outline-offset:-3px}
.fk-pdf .fk-pdf-msg{max-width:560px;margin:0}
.fk-pdf .fk-pdf-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.fk-pdf .fk-pdf-actions button{min-height:44px}
.fk-pdf .fk-pdf-actions [aria-disabled="true"]{opacity:.55}
.fk-pdf .fk-pdf-text{margin:18px 0 0;max-width:720px}
.fk-pdf .fk-pdf-text h4{color:#5f6662}
.fk-pdf .fk-pdf-stage{display:flex;opacity:0;background:var(--fk-pdf-workspace)}
.fk-pdf .fk-pdf-stage:not(.is-shown){pointer-events:none}
.fk-pdf .fk-pdf-stage.is-shown{opacity:1}
.fk-pdf .fk-pdf-view{flex:1;min-width:0;min-height:0}
/* the answer to a tap that could not act (pdfview.js tell): over the top of the body, in the state box's top padding,
   for a few seconds; it never sizes anything */
.fk-pdf .fk-pdf-note{grid-area:1/1;align-self:start;justify-self:center;z-index:1;max-width:calc(100% - 16px);margin:4px 8px 0;padding:4px 10px;border:1px solid var(--line,#e8e9e7);border-radius:8px;background:#fff;box-shadow:0 1px 2px rgba(35,37,39,.06);color:#3d4340;font-size:12px;line-height:16px;pointer-events:none}
.fk-pdf .fk-pdf-note[hidden]{display:none}
.fk-pdf[data-state=ready] .fk-pdf-state{visibility:hidden}
.fk-pdf[data-state=no-key] .fk-pdf-stage,.fk-pdf[data-state=refused] .fk-pdf-stage,.fk-pdf[data-state=unreachable] .fk-pdf-stage,
.fk-pdf[data-state=offline] .fk-pdf-stage,.fk-pdf[data-state=failed] .fk-pdf-stage,.fk-pdf[data-state=missing] .fk-pdf-stage,
.fk-pdf[data-state=changed] .fk-pdf-stage,.fk-pdf[data-state=storage] .fk-pdf-stage,.fk-pdf[data-state=tools] .fk-pdf-stage{visibility:hidden}

/* phones: row 1 is the version control and our icons, row 2 the page's main action at full width */
@media(max-width:650px){
  .fk-pdf .fk-pdf-meta{display:none}
  .fk-pdf .fk-pdf-tools{flex:1 1 0}
  .fk-pdf .fk-pdf-act{order:3;flex:1 1 100%}
  .fk-pdf .fk-pdf-act > *{flex:1 1 auto;justify-content:center}
  /* the skip button, while focused, sits over the start of row 1, so the version control never gives up its width */
  .fk-pdf .fk-pdf-skip:focus-visible{position:absolute;left:8px;top:4px;z-index:1;background:#fff;border-radius:8px}
}
@media(prefers-reduced-motion:reduce){.fk-pdf .fk-pdf-stage{transition:none}}
