/* Scientific calculator on the student exam screen (v2.12.0) */
.blv-calc-toggle {
    position: fixed; right: 16px; bottom: 76px; z-index: 100001;
    width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
    background: #1a1a2e; color: #fff; font-size: 24px; line-height: 52px; padding: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.blv-calc-toggle:hover, .blv-calc-toggle:focus { background: #2a2a4a; outline: 2px solid #f59e0b; }
.blv-calc {
    position: fixed; right: 16px; bottom: 136px; z-index: 100002;
    width: 296px; max-width: calc(100vw - 16px); box-sizing: border-box;
    background: #16213e; color: #fff; border-radius: 14px; padding: 10px;
    box-shadow: 0 12px 36px rgba(0,0,0,.45); font-family: Arial, Helvetica, sans-serif;
    user-select: none; -webkit-user-select: none; touch-action: manipulation; outline: none;
}
.blv-calc-head { display: flex; align-items: center; justify-content: space-between; cursor: move; padding: 2px 4px 8px; touch-action: none; }
.blv-calc-title { font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.blv-calc-close { background: transparent; border: 0; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 6px; }
.blv-calc-screen { background: #e8efe0; color: #111; border-radius: 8px; padding: 6px 10px 8px; margin-bottom: 8px; min-height: 66px; text-align: right; }
.blv-calc-flags { font-size: 10px; color: #4b5563; text-align: left; height: 13px; }
.blv-calc-expr { font-size: 17px; font-family: Consolas, Menlo, monospace; white-space: nowrap; overflow-x: auto; overflow-y: hidden; height: 24px; line-height: 24px; }
.blv-calc-res { font-size: 24px; font-weight: 700; font-family: Consolas, Menlo, monospace; height: 30px; line-height: 30px; white-space: nowrap; overflow: hidden; }
.blv-calc-res.blv-calc-err { color: #b91c1c; font-size: 17px; }
.blv-calc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.blv-calc-key {
    border: 0; border-radius: 7px; padding: 0; height: 38px; font-size: 14px; cursor: pointer;
    background: #2f3b66; color: #fff; font-family: inherit; min-width: 0;
}
.blv-calc-key:active { transform: translateY(1px); filter: brightness(1.25); }
.blv-calc-key.num { background: #3b4a7d; font-size: 16px; font-weight: 600; }
.blv-calc-key.op  { background: #54638f; font-size: 16px; }
.blv-calc-key.mode { background: #475569; font-size: 12px; }
.blv-calc-key.mode.on { background: #f59e0b; color: #111; }
.blv-calc-key.eq  { background: #f59e0b; color: #111; font-weight: 700; font-size: 18px; }
@media (max-width: 480px) {
    .blv-calc { right: 8px; left: auto; bottom: 126px; width: 280px; }
    .blv-calc-key { height: 36px; }
}
