/* =========================================================
   StatStudyHub Shared Calculator Styles
   Applies to all calculators using .statstudy-calculator
========================================================= */

.statstudy-calculator {
  border: 0;
  border-radius: 1.25rem;
}

.statstudy-calculator .card-body {
  padding: 1.25rem;
}

/* Titles */
.statstudy-calculator .statstudy-calculator-title,
.statstudy-calculator .statstudy-section-title,
.statstudy-calculator .statstudy-input-title {
  color: #037ef3;
}

.statstudy-calculator .statstudy-calculator-title {
  font-weight: 700;
}

.statstudy-calculator .statstudy-section-title {
  font-weight: 700;
}

/* Inputs */
.statstudy-calculator .statstudy-input-title {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.statstudy-calculator .form-control,
.statstudy-calculator .form-select {
  border-radius: 0.75rem;
  min-height: 44px;
}

.statstudy-calculator .form-control:focus,
.statstudy-calculator .form-select:focus {
  border-color: #037ef3;
  box-shadow: 0 0 0 0.2rem rgba(3, 126, 243, 0.15);
}

.statstudy-calculator .form-text {
  font-size: 0.85rem;
}

/* Result card */
.statstudy-calculator .statstudy-result-card {
  border: 1px solid rgba(3, 126, 243, 0.16);
  border-left: 5px solid #037ef3;
  border-radius: 1rem;
  background: #f8fbff;
  padding: 1rem;
}

.statstudy-calculator .statstudy-result-card .display-6 {
  font-weight: 700;
}

/* Step explanation wrapper */
.statstudy-calculator .statstudy-steps-wrap {
  border: 1px solid rgba(3, 126, 243, 0.18) !important;
  border-radius: 1rem !important;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

/* Step intro */
.statstudy-calculator .statstudy-steps-intro {
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: rgba(3, 126, 243, 0.08);
  margin-bottom: 1rem;
}

/* Step cards */
.statstudy-calculator .statstudy-step-card {
  background: #ffffff;
  border: 1px solid #e9eef5;
  border-radius: 0.95rem;
  padding: 1rem;
  margin-bottom: 0.9rem;
}

.statstudy-calculator .statstudy-step-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: #037ef3;
  margin-bottom: 0.5rem;
}

.statstudy-calculator .statstudy-step-number {
  width: 1.65rem;
  height: 1.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: #037ef3;
  font-size: 0.85rem;
  flex: 0 0 auto;
}

/* Lists inside steps */
.statstudy-calculator .statstudy-value-list {
  margin-bottom: 0;
  padding-left: 1.1rem;
}

.statstudy-calculator .statstudy-value-list li {
  margin-bottom: 0.35rem;
}

/* Final interpretation note */
.statstudy-calculator .statstudy-final-note {
  border-radius: 0.85rem;
  background: #fff8e8;
  border-left: 4px solid #f59e0b;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
}

/* Math/formula boxes */
.statstudy-calculator .math-wrap {
  overflow-x: auto;
  display: block;
  white-space: nowrap;
  width: 100%;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Charts */
.statstudy-calculator .statstudy-chart-wrap {
  border: 1px solid #e9eef5;
  border-radius: 0.95rem;
  background: #ffffff;
  padding: 0.75rem;
}

/* Alerts */
.statstudy-calculator .alert {
  margin-bottom: 0;
}

/* Mobile spacing */
@media (max-width: 576px) {
  .statstudy-calculator {
    border-radius: 1rem;
  }

  .statstudy-calculator .card-body {
    padding: 1rem;
  }

  .statstudy-calculator .statstudy-step-card {
    padding: 0.85rem;
  }

  .statstudy-calculator .statstudy-result-card {
    padding: 0.85rem;
  }
}

.statstudy-fraction-calc .frac-expression-row {
  width: 100%;
}

.statstudy-fraction-calc .frac-stack {
  min-width: 140px;
}

.statstudy-fraction-calc .frac-operator-wrap {
  min-height: 118px;
}

.statstudy-fraction-calc .frac-op {
  width: 72px;
  min-width: 72px;
  text-align: center;
  font-size: 1.1rem;
}

@media (max-width: 767.98px) {
  .statstudy-fraction-calc .frac-operator-wrap {
    min-height: auto;
  }
}