<>
/* Scoped s to avoid interference with WP theme */
.scalc-root {
--bg:#f0f4f8;
--panel:#2f5f8a;
--btn:#e9eef3;
--btn-dark:#c7d3de;
--accent:#6ea0d1;
--text:#0b2b42;
font-family: ArialHelveticasans-serif;
background:transparent;
padding:0;
max-width: 100%;
box-sizing: border-box;
width: 100%;
}
.scalc-top {
display:flex;
gap:8px;
align-items:center;
margin-bottom:8px;
width: 100%;
box-sizing: border-box;
}
.scalc-display {
background:var(--panel);
color:#fff;
padding:8px 10px;
border-radius:4px;
font-size:18px;
flex:1;
display:flex;
justify-content:flex-end;
align-items:center;
min-width:0;
box-sizing:border-box;
overflow: hidden;
text-overflow: ellipsis;
height: 40px;
}
.scalc-display #scalc-value {
font-weight:700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
text-align: right;
}
.scalc-mode {
display:flex;
gap:6px;
align-items:center;
white-space:nowrap;
font-size:12px;
color:#1b2d3f;
}
.scalc-keys {
display: grid;
grid-auto-flow: column;
grid-template-rows: repeat(6minmax(40px1fr));
gap: 5px;
align-items: stretch;
justify-items: stretch;
width: 100%;
margin-top: 5px;
}
.scalc-keys .sc-btn {
background:var(--btn);
border:0;
border-radius:6px;
font-weight:700;
cursor:pointer;
color:var(--text);
box-shadow: inset 0 -2px rgba(0,0,0,.03);
padding: 0;
font-size: 14px;
min-height: 40px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
aspect-ratio: 1/1;
width: 100%;
overflow: hidden;
}
.scalc-keys .sc-btn sup {
font-size: 0.7em;
vertical-align: super;
}
.scalc-keys .sc-num { background:#d8e6f6; }
.scalc-keys .sc-op { background:var(--btn-dark); color:#082033; }
.scalc-keys .sc-accent { background:var(--accent); color:white; }
.scalc-keys .sc-btn:active { transform: translateY(1px); }
/* Mobile-specific adjustments */
@media (max-width: 600px) {
.scalc-root {
padding: 0 5px;
}
.scalc-keys {
gap: 4px;
}
.scalc-keys .sc-btn {
font-size: 12px;
min-height: 36px;
border-radius: 5px;
}
.scalc-display {
font-size: 16px;
padding: 6px 8px;
height: 36px;
}
.scalc-mode {
font-size: 11px;
gap: 4px;
}
.scalc-top {
gap: 6px;
margin-bottom: 6px;
}
}
/* Very small screens */
@media (max-width: 400px) {
.scalc-keys .sc-btn {
font-size: 11px;
min-height: 32px;
}
.scalc-display {
font-size: 15px;
height: 34px;
}
}
/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
.scalc-keys {
grid-template-rows: repeat(6minmax(30px1fr));
}
.scalc-keys .sc-btn {
min-height: 30px;
font-size: 10px;
}
.scalc-display {
height: 30px;
font-size: 14px;
}
}
>