/* assets/calculators/scientific.css */
/* Scientific Pro UI */

.mc-calc--scientific-pro .mc-calc__inner.sci-pro{
  max-width: 820px;
  margin: 0 auto;
  --panel1:#f0f1f3;
  --panel2:#e7e8eb;
  --edge:#c9cbd1;
  --shadow:rgba(0,0,0,.16);

  --frame1:#2a2d33;
  --frame2:#15171c;

  --lcd1:#d9ead9;
  --lcd2:#cfe4cf;
  --lcdText:#132417;

  --key1:#ffffff;
  --key2:#f2f3f5;

  --fn1:#eef0f3;
  --fn2:#e2e6ec;

  --op1:#dbeafe;
  --op2:#cfe1ff;
  --opText:#0b2b55;

  --shift1:#ffd08a;
  --shift2:#ffbf66;

  --danger1:#ff6a6a;
  --danger2:#ff4d4d;

  --eq1:#2563eb;
  --eq2:#1d4ed8;

  --text:#12161a;
}

.mc-calc--scientific-pro .sci-pro__panel{
  background:linear-gradient(180deg,var(--panel1) 0%, var(--panel2) 100%);
  border:1px solid var(--edge);
  border-radius:18px;
  box-shadow:0 18px 40px var(--shadow);
  padding:16px;
  position:relative;
  overflow:hidden;
}

.mc-calc--scientific-pro .sci-pro__display{
  background:linear-gradient(180deg,var(--frame1),var(--frame2));
  border-radius:14px;
  padding:12px 12px 10px;
  border:1px solid rgba(0,0,0,.25);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
  margin-bottom:14px;
}

.mc-calc--scientific-pro .sci-pro__meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:1000;
  font-size:12px;
  letter-spacing:.6px;
  color:rgba(255,255,255,.78);
  margin-bottom:8px;
}

.mc-calc--scientific-pro .sci-pro__flags{
  display:flex;
  gap:10px;
  align-items:center;
}

.mc-calc--scientific-pro .sci-pro__flag{
  font-weight:1000;
  font-size:11px;
  letter-spacing:.6px;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  opacity:0;
  transition:opacity .12s ease;
}
.mc-calc--scientific-pro .sci-pro__flag--mem{
  background:rgba(255,255,255,.12);
}

.mc-calc--scientific-pro .sci-pro__lcd{
  border-radius:12px;
  background:linear-gradient(180deg,var(--lcd1),var(--lcd2));
  border:1px solid rgba(0,0,0,.25);
  box-shadow:inset 0 2px 14px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.35);
  overflow:hidden;
  padding:10px 12px 12px;
}

.mc-calc--scientific-pro .sci-pro__expr{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-weight:900;
  font-size:12px;
  color:rgba(19,36,23,.72);
  min-height:16px;
  text-align:right;
  word-break:break-word;
}

.mc-calc--scientific-pro .sci-pro__value{
  width:100%;
  border:0;
  outline:none;
  background:transparent;
  color:var(--lcdText);
  text-align:right;
  font-weight:1000;
  font-size:clamp(26px, 4.6vw, 42px);
  padding:6px 0 0;
  letter-spacing:.2px;
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
}

.mc-calc--scientific-pro .sci-pro__keys{
  display:grid;
  gap:10px;
}

.mc-calc--scientific-pro .sci-pro__row{
  display:grid;
  grid-template-columns:repeat(5, minmax(0,1fr));
  gap:10px;
}

.mc-calc--scientific-pro .sci-pro__key{
  appearance:none;
  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  background:linear-gradient(180deg,var(--key1) 0%, var(--key2) 100%);
  color:var(--text);
  font-weight:1000;
  cursor:pointer;
  user-select:none;
  padding:10px 8px 12px;
  box-shadow:0 2px 0 rgba(0,0,0,.12);
  transition:transform .05s ease, box-shadow .05s ease, filter .15s ease;
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height:58px;
}

.mc-calc--scientific-pro .sci-pro__key:hover{ filter:brightness(.99); }
.mc-calc--scientific-pro .sci-pro__key:active{
  transform:translateY(1px);
  box-shadow:0 1px 0 rgba(0,0,0,.12);
}

.mc-calc--scientific-pro .sci-pro__kSub{
  font-size:10px;
  line-height:1;
  font-weight:1000;
  color:rgba(18,22,26,.65);
  letter-spacing:.2px;
}
.mc-calc--scientific-pro .sci-pro__kSub--empty{ opacity:0; }

.mc-calc--scientific-pro .sci-pro__kMain{
  font-size:16px;
  line-height:1;
  font-weight:1000;
}

.mc-calc--scientific-pro .sci-pro__key.is-fn{
  background:linear-gradient(180deg,var(--fn1) 0%, var(--fn2) 100%);
}
.mc-calc--scientific-pro .sci-pro__key.is-op{
  background:linear-gradient(180deg,var(--op1) 0%, var(--op2) 100%);
  color:var(--opText);
}
.mc-calc--scientific-pro .sci-pro__key.is-shift{
  background:linear-gradient(180deg,var(--shift1) 0%, var(--shift2) 100%);
}
.mc-calc--scientific-pro .sci-pro__key.is-danger{
  border-color:rgba(0,0,0,.22);
  background:linear-gradient(180deg,var(--danger1) 0%, var(--danger2) 100%);
  color:#fff;
}
.mc-calc--scientific-pro .sci-pro__key.is-eq{
  border-color:rgba(0,0,0,.22);
  background:linear-gradient(180deg,var(--eq1) 0%, var(--eq2) 100%);
  color:#fff;
}

.mc-calc--scientific-pro .sci-pro__history{
  margin-top:14px;
  background:linear-gradient(180deg,#ffffff 0%, #f5f6f8 100%);
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:10px;
}

.mc-calc--scientific-pro .sci-pro__historyHdr{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.mc-calc--scientific-pro .sci-pro__historyHdr h4{
  margin:0;
  font-size:13px;
  font-weight:1000;
}
.mc-calc--scientific-pro .sci-pro__historyBtns{
  display:flex;
  gap:8px;
}

.mc-calc--scientific-pro .sci-pro__historyList{
  list-style:none;
  padding:0;
  margin:0;
  max-height:180px;
  overflow:auto;
  border-top:1px dashed rgba(0,0,0,.12);
}
.mc-calc--scientific-pro .sci-pro__historyList li{
  padding:8px 2px;
  border-bottom:1px dashed rgba(0,0,0,.12);
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-weight:900;
  font-size:12px;
  color:rgba(18,22,26,.78);
  word-break:break-word;
}
.mc-calc--scientific-pro .sci-pro__historyList li:last-child{ border-bottom:0; }

@media (max-width:560px){
  .mc-calc--scientific-pro .sci-pro__panel{ padding:14px; }
  .mc-calc--scientific-pro .sci-pro__key{ min-height:56px; }
  .mc-calc--scientific-pro .sci-pro__kMain{ font-size:15px; }
}