/* the reader's button group: hug the buttons (no empty space after Dictionary) and wrap if the window is narrow */
#astra-toolbar .toolbar-col.text.pvd-has-btn{display:flex!important;flex-wrap:wrap;justify-self:start;width:fit-content!important;max-width:100%}
#astra-toolbar .toolbar-col.text.pvd-has-btn label{flex:0 0 auto;width:auto!important;padding-left:14px;padding-right:14px;white-space:nowrap}
.pvd-btn{display:block;cursor:pointer;user-select:none;margin:0;padding:6px 14px;border-radius:10px;background:#f1f1f1;color:#796d64;text-align:center;font:inherit;white-space:nowrap}
.pvd-btn:hover,.pvd-btn:focus{outline:2px solid #c9a15a;outline-offset:-2px}
#astra-toolbar .pvd-btn.pvd-active,.pvd-btn.pvd-active{background:#7a1712!important;color:#fff!important}
#astra-toolbar .pvd-toolbar-on label:not(.pvd-btn){background:#f1f1f1!important;color:#796d64!important}
.pvd-on .pvd-w{cursor:help;border-bottom:1px dotted rgba(122,23,18,.45);border-radius:2px;transition:background .12s}
.pvd-on .pvd-w:hover,.pvd-on .pvd-w:focus,.pvd-on .pvd-w.pvd-cur{background:#f3e3b5;outline:none}
.pvd-on .pvd-w.pvd-none{border-bottom-color:transparent;cursor:auto}
.pvd-on .pvd-sent{background:#f7ecd0;box-shadow:0 0 0 2px #f7ecd0;border-radius:2px;transition:background .15s}
.pvd-card{position:absolute;z-index:99999;width:340px;max-width:calc(100vw - 16px);background:#fff;color:#222;border:1px solid #c9a15a;border-radius:10px;box-shadow:0 8px 28px rgba(60,20,10,.18);padding:10px 14px 8px;font-family:Georgia,'Times New Roman',serif;font-size:14px;line-height:1.45;text-align:left}
.pvd-card.pvd-full{width:420px;max-height:70vh;overflow:auto}
.pvd-card[hidden]{display:none}
/* invisible margin around the card, so the mouse can travel from the word to the card */
.pvd-card:not(.pvd-sheet)::before{content:'';position:absolute;left:-12px;right:-12px;top:-12px;bottom:-12px;z-index:-1}
.pvd-sheet{position:fixed;left:0!important;right:0;bottom:0;top:auto!important;width:auto;max-width:none;max-height:60vh;overflow:auto;border-radius:14px 14px 0 0;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
.pvd-sheet.pvd-full{width:auto}
.pvd-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eadfc8;padding-bottom:4px;margin-bottom:6px}
.pvd-word{font-size:18px;font-weight:bold;color:#7a1712}
.pvd-x{background:none;border:0;font-size:20px;line-height:1;color:#7a6a55;cursor:pointer;padding:0 2px}
.pvd-lbl{font:bold 10px/1.4 Arial,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#b0893f;margin-top:4px}
.pvd-gloss{font-weight:bold;margin-bottom:2px}
.pvd-entry{margin:3px 0 6px}
.pvd-pos{color:#6b5b45}
.pvd-gram{color:#444;font-size:13px}
.pvd-mean{margin-top:1px}
.pvd-match{background:#f3e3b5;padding:0 2px;border-radius:2px;color:inherit}
.pvd-note{font:11px Arial,sans-serif;color:#2f6b2f;white-space:nowrap}
.pvd-small{font-size:12.5px;color:#555;margin-top:1px}
.pvd-empty{color:#666;margin:4px 0}
.pvd-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px;padding-top:6px;border-top:1px solid #eadfc8}
.pvd-actions button,.pvd-login{font:12px Arial,sans-serif;background:#f6efe1;border:1px solid #d9c59b;color:#7a1712;border-radius:6px;padding:4px 9px;cursor:pointer;text-decoration:none}
.pvd-actions button:hover,.pvd-login:hover{background:#7a1712;color:#fff}
.pvd-actions button[disabled]{opacity:.8;cursor:default}
.pvd-credit{margin-top:6px;font:10.5px Arial,sans-serif}
.pvd-credit a{color:#8a7a62;text-decoration:none}
.pvd-admin{position:fixed;left:10px;bottom:10px;z-index:99998;background:#7a1712;color:#fff;font:12px Arial,sans-serif;padding:6px 10px;border-radius:6px;opacity:.92}
.pvd-part{font-size:13.5px;margin:2px 0}
.pvd-eng{font-style:italic}
@media (max-width:760px){
 .pvd-on main.sutta-content .entry-content{display:block!important}
 .pvd-on main.sutta-content section.pali,.pvd-on main.sutta-content section.other{display:block!important;width:auto!important;max-width:100%!important;float:none!important}
 .pvd-on main.sutta-content section.other{margin-top:1.5em;padding-top:1em;border-top:1px solid #eadfc8}
}
.pvd-mywords{width:100%;border-collapse:collapse}
.pvd-mywords td,.pvd-mywords th{border-bottom:1px solid #eadfc8;padding:6px;vertical-align:top;text-align:left}
.pvd-card button,.pvd-card .pvd-login{letter-spacing:normal!important;text-transform:none!important;line-height:1.3!important;min-height:0!important;box-shadow:none!important}
.pvd-card .pvd-x{background:none!important;border:0!important;padding:0 2px!important;color:#7a6a55!important}

/* desktop: size the first toolbar column to fit all five buttons, so "Dictionary View" stays on the same row */
@media (min-width:1024px){#astra-toolbar:has(.pvd-has-btn){grid-template-columns:max-content 1fr 1fr}}
/* if the buttons ever wrap, let the white box grow to contain them */
#astra-toolbar .toolbar-col.text.pvd-has-btn{height:auto!important;min-height:40px;row-gap:4px}

/* Theme-aware highlights: Dark and Sepia reader themes */
.pvd-on body.dark .pvd-w { border-bottom-color: rgba(233, 204, 140, .6); }
.pvd-on body.dark .pvd-w:hover, .pvd-on body.dark .pvd-w:focus, .pvd-on body.dark .pvd-w.pvd-cur { background: rgba(212, 167, 82, .42); }
.pvd-on body.dark .pvd-sent { background: rgba(212, 167, 82, .26); box-shadow: 0 0 0 2px rgba(212, 167, 82, .26); }
.pvd-on body.sepia .pvd-w:hover, .pvd-on body.sepia .pvd-w:focus, .pvd-on body.sepia .pvd-w.pvd-cur { background: #ecd28f; }
.pvd-on body.sepia .pvd-sent { background: #f1dfa6; box-shadow: 0 0 0 2px #f1dfa6; }
