/* OfficeCalculator.Net v97 — unified calculator workspace/result presentation */
:root{
  --oc-v97-result-border:#c8d8f3;
  --oc-v97-result-bg:radial-gradient(circle at 92% 4%,rgba(37,99,235,.13),transparent 34%),linear-gradient(135deg,#eef5ff,#fff);
  --oc-v97-result-shadow:0 13px 30px rgba(37,99,235,.08);
  --oc-v97-text:var(--r47-text,var(--oc30-ink,#152036));
  --oc-v97-muted:var(--r47-muted,var(--oc30-muted,#667189));
  --oc-v97-line:var(--r47-line,var(--oc30-line,#dce3ee));
  --oc-v97-soft:var(--r47-soft,var(--oc30-panel-2,#f4f7fb));
  --oc-v97-primary:var(--r47-primary,#2563eb);
}
body.oc-dark{
  --oc-v97-result-border:#31517d;
  --oc-v97-result-bg:radial-gradient(circle at 92% 4%,rgba(91,140,255,.16),transparent 34%),linear-gradient(135deg,#142b4b,#152336);
}

/* Keep the three calculator generations visually consistent. */
.oc-r47-result,.oc-r58-result-panel,.oc-adv-result,.oc-v97-adv-placeholder,.oc-v97-simple-result{
  border-color:var(--oc-v97-result-border)!important;
  border-radius:18px!important;
  background:var(--oc-v97-result-bg)!important;
  box-shadow:var(--oc-v97-result-shadow)!important;
}
.oc-r47-result-label,.oc-r58-result-kicker,.oc-adv-result-label,.oc-v97-simple-result-label{
  color:var(--oc-v97-primary)!important;
  font-size:.7rem!important;
  font-weight:900!important;
  letter-spacing:.09em!important;
  text-transform:uppercase!important;
}
.oc-r58-result-panel{min-height:275px!important;padding:20px!important}
.oc-r58-result-placeholder{min-height:232px!important}
.oc-r58-result-actions button,.oc-adv-result-actions button,.oc-v97-simple-actions button{
  min-height:43px!important;padding:9px 15px!important;border-radius:10px!important;font-weight:800!important;cursor:pointer!important
}

/* v97: advanced-tool pages now use the same desktop input-left/result-right workspace as rebuilt calculators. */
@media(min-width:981px){
  .oc-adv-tool{
    display:grid!important;
    grid-template-columns:minmax(0,1.08fr) minmax(310px,.92fr)!important;
    grid-template-areas:"head head" "form result" "message result"!important;
    gap:18px 20px!important;
    align-items:start!important;
  }
  .oc-adv-tool>.oc-adv-head{grid-area:head;margin-bottom:0!important}
  .oc-adv-tool>.oc-adv-form{grid-area:form;min-width:0}
  .oc-adv-tool>.oc-adv-message{grid-area:message;margin-top:-4px!important}
  .oc-adv-tool>.oc-adv-result,.oc-adv-tool>.oc-v97-adv-placeholder{
    grid-area:result;
    position:sticky;
    top:96px;
    align-self:start;
    min-height:275px;
    margin-top:0!important;
    padding:20px!important;
  }
}
.oc-v97-adv-placeholder{
  display:grid;
  place-items:center;
  box-sizing:border-box;
  min-height:275px;
  padding:20px;
  color:var(--oc-v97-muted);
  text-align:center;
}
.oc-v97-adv-placeholder[hidden]{display:none!important}
.oc-v97-adv-placeholder strong{display:block;margin-bottom:6px;color:var(--oc-v97-text);font-size:1.1rem}
.oc-v97-adv-placeholder span{display:block;max-width:310px;line-height:1.55}
.oc-adv-result{min-height:275px!important}
.oc-adv-main{font-size:clamp(2rem,5vw,3.2rem)!important;font-weight:950!important;letter-spacing:-.045em!important}
.oc-adv-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;margin-top:15px!important}
.oc-adv-stat{padding:11px!important;border-radius:11px!important}
.oc-adv-formula{margin-top:12px!important;padding:11px 12px!important;border-radius:10px!important;font-size:.81rem!important}
.oc-adv-result-actions{gap:7px!important;margin-top:13px!important}
.oc-adv-result-actions button:first-child{background:var(--oc-v97-primary)!important;color:#fff!important;border-color:var(--oc-v97-primary)!important}
.oc-v97-result-close{display:none;position:absolute;top:10px;right:10px;width:34px!important;height:34px!important;min-height:34px!important;padding:0!important;border:1px solid var(--oc-v97-line)!important;border-radius:9px!important;background:#fff!important;color:var(--oc-v97-text)!important;font-size:18px!important;line-height:1!important;box-shadow:none!important}
body.oc-dark .oc-v97-result-close{background:#161e2c!important}

/* Single remaining legacy form receives the same visual input/result split without changing its calculation. */
.oc-v97-simple-layout{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(310px,.92fr);gap:18px;align-items:start;margin:18px 0 28px}
.oc-v97-simple-input{min-width:0;padding:18px;border:1px solid var(--oc-v97-line);border-radius:16px;background:#fff}
body.oc-dark .oc-v97-simple-input{background:#161e2c}
.oc-v97-simple-input form{margin:0!important}
.oc-v97-simple-input label{display:block;margin:0 0 6px;font-weight:780;color:var(--oc-v97-text)}
.oc-v97-simple-input input[type=number],.oc-v97-simple-input select{width:100%!important;min-height:46px!important;margin:0 0 13px!important;padding:10px 12px!important;border:1px solid var(--oc-v97-line)!important;border-radius:11px!important;background:var(--oc-v97-soft)!important;color:var(--oc-v97-text)!important;box-sizing:border-box}
.oc-v97-simple-input input[type=button],.oc-v97-simple-input button{min-height:43px!important;padding:9px 15px!important;border:0!important;border-radius:10px!important;background:var(--oc-v97-primary)!important;color:#fff!important;font-weight:800!important;cursor:pointer!important}
.oc-v97-simple-result{position:sticky;top:96px;min-height:275px;padding:20px;box-sizing:border-box}
.oc-v97-simple-placeholder{display:grid;place-items:center;min-height:220px;color:var(--oc-v97-muted);text-align:center}
.oc-v97-simple-placeholder strong{display:block;margin-bottom:6px;color:var(--oc-v97-text);font-size:1.1rem}
.oc-v97-simple-result.has-result .oc-v97-simple-placeholder{display:none}
.oc-v97-simple-result-body{display:none}.oc-v97-simple-result.has-result .oc-v97-simple-result-body{display:block}
.oc-v97-simple-result-main{display:block;margin:7px 0 10px;color:#163b78;font-size:clamp(2rem,5vw,3rem);font-weight:950;line-height:1.05;overflow-wrap:anywhere}
body.oc-dark .oc-v97-simple-result-main{color:#d8e8ff}
.oc-v97-simple-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.oc-v97-simple-actions button{background:var(--oc-v97-primary)!important;color:#fff!important;border:1px solid var(--oc-v97-primary)!important}

@media(max-width:980px){
  .oc-v97-adv-placeholder{display:none!important}
  .oc-v97-simple-layout{grid-template-columns:1fr}
  .oc-v97-simple-result{position:relative;top:auto;min-height:220px}
}
@media(max-width:700px){
  .oc-adv-result:not([hidden]){
    display:block!important;
    position:fixed!important;
    z-index:10020!important;
    left:10px!important;right:10px!important;bottom:10px!important;top:auto!important;
    max-height:min(78vh,580px)!important;min-height:0!important;
    overflow:auto!important;padding:18px 16px 16px!important;
    box-shadow:0 22px 70px rgba(0,0,0,.38)!important;
  }
  .oc-adv-result:not([hidden]) .oc-v97-result-close{display:grid;place-items:center}
  .oc-adv-main{padding-right:35px}
  .oc-adv-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .oc-adv-result-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  .oc-adv-result-actions button{width:100%!important}
  .oc-adv-result-actions button:first-child{grid-column:1/-1}
  .oc-v97-adv-backdrop{display:none;position:fixed;z-index:10010;inset:0;background:rgba(7,16,29,.56);backdrop-filter:blur(2px)}
  body.oc-v97-adv-result-open .oc-v97-adv-backdrop{display:block}
  body.oc-v97-adv-result-open{overflow:hidden!important}
  .oc-v97-simple-layout{display:block}.oc-v97-simple-result{margin-top:16px}
}
@media(max-width:430px){.oc-adv-stats{grid-template-columns:1fr!important}}


/* OfficeCalculator.Net v101 — universal result action contrast */
/* Keep the three result actions visually identical and readable in normal, hover,
   keyboard-focus and pressed states across rebuilt, advanced and business tools. */
.oc-r47-result-actions,
.oc-adv-result-actions,
.bt-result-actions{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:9px!important;
  align-items:stretch!important;
}
.oc-r47-result-actions button,
.oc-adv-result-actions button,
.bt-result-actions button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:44px!important;
  margin:0!important;
  padding:9px 12px!important;
  border:1px solid #1d4ed8!important;
  border-radius:10px!important;
  background:#2563eb!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  box-shadow:0 7px 18px rgba(37,99,235,.18)!important;
  font-weight:800!important;
  line-height:1.2!important;
  text-align:center!important;
  text-decoration:none!important;
  text-shadow:none!important;
  cursor:pointer!important;
  opacity:1!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease!important;
}
.oc-r47-result-actions button:hover,
.oc-adv-result-actions button:hover,
.bt-result-actions button:hover{
  border-color:#123b9b!important;
  background:#1746b6!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  box-shadow:0 10px 22px rgba(23,70,182,.24)!important;
  transform:translateY(-1px)!important;
}
.oc-r47-result-actions button:active,
.oc-adv-result-actions button:active,
.bt-result-actions button:active{
  border-color:#103681!important;
  background:#123b9b!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  transform:translateY(0)!important;
  box-shadow:0 4px 12px rgba(18,59,155,.22)!important;
}
.oc-r47-result-actions button:focus-visible,
.oc-adv-result-actions button:focus-visible,
.bt-result-actions button:focus-visible{
  outline:3px solid rgba(37,99,235,.28)!important;
  outline-offset:3px!important;
  border-color:#123b9b!important;
  background:#1746b6!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
.oc-r47-result-actions button:disabled,
.oc-adv-result-actions button:disabled,
.bt-result-actions button:disabled{
  border-color:#7899dc!important;
  background:#8aa7df!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  box-shadow:none!important;
  opacity:.78!important;
  cursor:not-allowed!important;
  transform:none!important;
}
body.oc-dark .oc-r47-result-actions button,
body.oc-dark .oc-adv-result-actions button,
body.oc-dark .bt-result-actions button{
  border-color:#7297ff!important;
  background:#315fd4!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
body.oc-dark .oc-r47-result-actions button:hover,
body.oc-dark .oc-adv-result-actions button:hover,
body.oc-dark .bt-result-actions button:hover{
  border-color:#9bb6ff!important;
  background:#4775e2!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
@media(max-width:820px){
  .oc-r47-result-actions,
  .oc-adv-result-actions,
  .bt-result-actions{grid-template-columns:1fr 1fr!important}
  .oc-r47-result-actions button:last-child,
  .oc-adv-result-actions button:last-child,
  .bt-result-actions button:last-child{grid-column:1/-1!important}
}
@media(max-width:430px){
  .oc-r47-result-actions,
  .oc-adv-result-actions,
  .bt-result-actions{grid-template-columns:1fr!important}
  .oc-r47-result-actions button,
  .oc-adv-result-actions button,
  .bt-result-actions button{grid-column:auto!important}
}
