/* =============================================================================
   UOMG calculator — JobHub-styled page CSS
   Reskins the calculator / result / grading-scale / promo-modal UI (the JS in
   assets/uomg/script2.js drives the same DOM hooks — only the look changes).
   Uses --hb-* tokens so it follows the light/dark toggle.
   ============================================================================= */

/* ── Hero formula chip ── */
.uomg-hero-formula {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 26px; padding: 10px 20px;
  background: rgba(151,119,250,0.10); border-radius: 999px;
}
.uomg-hero-formula span { color: var(--hb-muted); font-weight: 600; font-size: 14px; }
.uomg-hero-formula code {
  font-family: "Montserrat", monospace; color: var(--hb-brand); font-weight: 600; font-size: 15px;
}

/* small pill badge (grading-scale eyebrow + promo badge) */
.badge {
  display: inline-block; font-family: "Montserrat", sans-serif; font-weight: 600;
  font-size: 13px; letter-spacing: .3px; color: var(--hb-brand);
  background: rgba(151,119,250,0.12); padding: 7px 16px; border-radius: 999px;
}

/* =============================================================================
   CALCULATOR PANEL
   ============================================================================= */
.calculator-panel {
  background: var(--hb-card); border: 1px solid var(--hb-border);
  border-radius: 16px; padding: 32px;
}
.calc-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.calc-header h2 { font-size: 22px; margin: 0; }

.course-row-header,
.course-row { display: grid; grid-template-columns: 1fr 1fr 46px; gap: 12px; align-items: center; }
.course-row-header {
  padding: 0 2px 10px; color: var(--hb-muted);
  font-family: "Montserrat", sans-serif; font-weight: 600; font-size: 13px;
}
.course-row { margin-bottom: 12px; }

/* course inputs (classes added by script2.js) */
.course-row .form-control,
.course-score, .course-credit {
  width: 100%; padding: 13px 16px;
  border: 1px solid var(--hb-border); border-radius: 10px;
  background: var(--hb-surface); color: var(--hb-heading);
  font-family: "Open Sans", sans-serif; font-size: 15px; line-height: 1.2;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.course-row .form-control:focus,
.course-score:focus, .course-credit:focus {
  outline: none; border-color: var(--hb-brand);
  box-shadow: 0 0 0 3px rgba(151,119,250,0.15);
}
.course-score::placeholder, .course-credit::placeholder { color: var(--hb-muted); }

.btn-remove {
  width: 46px; height: 46px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--hb-border); background: transparent;
  color: var(--hb-muted); font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.btn-remove:hover { border-color: #f87171; color: #f87171; background: rgba(248,113,113,0.08); }

.calc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.calc-error {
  margin-top: 16px; padding: 12px 16px; border-radius: 10px;
  background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.30);
  color: #ef5350; font-size: 14px;
}

/* empty-courses state */
#empty-courses { text-align: center; padding: 24px 10px; color: var(--hb-muted); }
#empty-courses .empty-icon { font-size: 42px; margin-bottom: 8px; }

/* =============================================================================
   RESULT PANEL (sticky sidebar)
   ============================================================================= */
.result-panel {
  position: sticky; top: 96px; scroll-margin-top: 96px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
  border-radius: 16px; padding: 28px;
}
.result-panel-title {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 18px;
  color: var(--hb-heading); margin-bottom: 16px;
}
.uomg-display { text-align: center; padding: 14px 0 6px; }
.uomg-number {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 58px; line-height: 1;
  background: linear-gradient(135deg, #9777fa, #5192ff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #9777fa;
}
.uomg-label { color: var(--hb-muted); font-size: 14px; margin-top: 8px; }
.uomg-standing {
  display: inline-block; margin-top: 16px; padding: 6px 18px; border-radius: 999px;
  font-family: "Montserrat", sans-serif; font-weight: 600; font-size: 14px;
  background: rgba(151,119,250,0.14); color: var(--hb-brand);
}
.uomg-standing.standing-excellent { background: rgba(0,192,112,0.14);  color: #00c070; }
.uomg-standing.standing-good      { background: rgba(79,195,247,0.16); color: #2f9bd6; }
.uomg-standing.standing-average   { background: rgba(251,191,36,0.18); color: #d19400; }
.uomg-standing.standing-low       { background: rgba(251,146,60,0.18); color: #e07a1f; }
.uomg-standing.standing-fail      { background: rgba(248,113,113,0.16); color: #ef5350; }
.uomg-desc { color: var(--hb-muted); font-size: 14px; margin-top: 10px; }

.result-placeholder { text-align: center; padding: 28px 10px; color: var(--hb-muted); }
.result-placeholder-icon { font-size: 44px; margin-bottom: 10px; }
.result-placeholder strong { color: var(--hb-brand); }

.formula-bar {
  margin-top: 18px; padding: 12px 16px; text-align: center;
  background: var(--hb-surface); border: 1px dashed var(--hb-border); border-radius: 10px;
  font-family: "Montserrat", sans-serif; color: var(--hb-text);
}
.formula-bar strong { color: var(--hb-heading); }

.result-breakdown { margin-top: 18px; }
.breakdown-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; border-bottom: 1px solid var(--hb-border); font-size: 14px;
}
.breakdown-row:last-child { border-bottom: 0; }
.breakdown-row .label { color: var(--hb-muted); }
.breakdown-row .value { color: var(--hb-heading); font-weight: 600; font-family: "Montserrat", sans-serif; }

.result-tips { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--hb-border); }
.result-tips-title { font-family: "Montserrat", sans-serif; font-weight: 600; color: var(--hb-heading); margin-bottom: 8px; }
.result-tips p { color: var(--hb-muted); font-size: 13px; margin: 5px 0; }

@media (max-width: 991px) {
  .result-panel { position: static; margin-top: 24px; }
}

/* =============================================================================
   GRADING SCALE CARDS
   ============================================================================= */
.scale-card {
  border: 1px solid; border-radius: 12px; padding: 22px 16px; text-align: center; height: 100%;
}
.scale-card-range { font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 22px; }
.scale-card-label { font-family: "Montserrat", sans-serif; font-weight: 600; font-size: 14px; margin-top: 4px; }
.scale-card-desc  { color: var(--hb-muted); font-size: 12px; margin-top: 10px; }

/* =============================================================================
   INTERNSHIP PROMO MODAL
   ============================================================================= */
.promo-overlay {
  position: fixed; inset: 0; z-index: 1050; padding: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,10,40,0.62); opacity: 0; transition: opacity .3s ease;
}
.promo-overlay.is-open { opacity: 1; }
.promo-dialog {
  position: relative; width: 100%; max-width: 820px;
  display: flex; overflow: hidden; border-radius: 18px;
  background: var(--hb-card); box-shadow: 0 30px 90px rgba(0,0,0,0.45);
  transform: translateY(14px) scale(0.98); transition: transform .3s ease;
}
.promo-overlay.is-open .promo-dialog { transform: none; }
.promo-close {
  position: absolute; top: 12px; right: 16px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,0.15); color: #fff; font-size: 24px; line-height: 1;
}
.promo-close:hover { background: rgba(0,0,0,0.30); }
.promo-media { flex: 0 0 44%; background: rgba(151,119,250,0.10); }
.promo-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-body { flex: 1; padding: 40px 36px; }
.promo-heading { font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 26px; margin: 16px 0 12px; color: var(--hb-heading); }
.promo-lead { color: var(--hb-muted); font-size: 15px; line-height: 1.6; margin-bottom: 24px; }
.promo-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 640px) {
  .promo-dialog { flex-direction: column; }
  .promo-media { flex-basis: 180px; max-height: 180px; }
  .promo-body { padding: 28px 24px; }
}
