/* =============================================================================
   IELTS overall band score calculator (/ielts) — JobHub-styled.
   Four section selects on the left, the live overall band and the rounding
   breakdown on the right, then the band descriptor scale in the explainer.
   Colours derive from --hb-* so both themes follow the global toggle.

   NOTE: the hero chip / panel / block / row / explainer rules below are the same
   ones that repeat in elave-is-saati.css, mezuniyyet.css and ipoteka.css. Still
   worth lifting into a shared calculator stylesheet.
   ============================================================================= */

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

/* ── Input panel ── */
.ie-panel { padding: 30px; }
.ie-panel-title {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 20px;
  color: var(--hb-heading); margin-bottom: 24px;
}

.ie-field { margin-bottom: 22px; }
.ie-label {
  display: block; font-weight: 600; font-size: 14px;
  color: var(--hb-heading); margin-bottom: 8px;
}

.ie-input {
  width: 100%; padding: 12px 14px; 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; height: auto;
}
.ie-input:focus { outline: none; border-color: var(--hb-brand); box-shadow: 0 0 0 3px rgba(151, 119, 250, 0.15); }
/* Native select arrow, drawn so it follows the theme instead of the UA default. */
select.ie-input {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--hb-muted) 50%),
                    linear-gradient(135deg, var(--hb-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 15px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.ie-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.ie-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Result column ── */
.ie-result {
  position: sticky; top: 96px;
  padding: 24px; border-radius: 16px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
}
.ie-result-placeholder { text-align: center; padding: 30px 10px; color: var(--hb-muted); }
.ie-result-icon { font-size: 44px; margin-bottom: 12px; }
.ie-result-placeholder p { font-size: 14px; line-height: 1.6; margin: 0; }

.ie-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ie-card { padding: 18px 14px; border-radius: 14px; text-align: center; }
.ie-card-main { background: linear-gradient(135deg, #9777fa, #6d4bd3); color: #fff; }
.ie-card-exact { background: rgba(81, 146, 255, 0.10); border: 1px solid rgba(81, 146, 255, 0.30); }
.ie-card-label { font-size: 12px; line-height: 1.4; margin: 0 0 6px; opacity: 0.9; }
.ie-card-exact .ie-card-label { color: #2f6fd0; opacity: 1; }
.ie-card-value {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 34px; line-height: 1.1;
  margin: 0; word-break: break-word;
}
.ie-card-exact .ie-card-value { color: #2f6fd0; }
.ie-card-unit { font-size: 10.5px; line-height: 1.4; margin: 5px 0 0; opacity: 0.8; }
.ie-card-exact .ie-card-unit { color: #2f6fd0; opacity: 1; }
:root[data-theme="dark"] .ie-card-exact .ie-card-label,
:root[data-theme="dark"] .ie-card-exact .ie-card-value,
:root[data-theme="dark"] .ie-card-exact .ie-card-unit { color: #7fb0ff; }

/* ── Band descriptor for the result ── */
.ie-descriptor {
  margin-top: 12px; padding: 16px; border-radius: 14px;
  background: rgba(151, 119, 250, 0.08); border: 1px solid var(--hb-border);
}
.ie-descriptor-label {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--hb-muted); margin-bottom: 4px;
}
.ie-descriptor-name {
  display: block; font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 16px;
  color: var(--hb-brand); margin-bottom: 6px;
}
.ie-descriptor-text { display: block; font-size: 12.5px; line-height: 1.6; color: var(--hb-text); }

/* ── Detail rows ── */
.ie-block {
  margin-top: 16px; border: 1px solid var(--hb-border); border-radius: 14px; overflow: hidden;
  background: var(--hb-card);
}
.ie-block-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--hb-surface); border-bottom: 1px solid var(--hb-border);
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 14.5px; color: var(--hb-heading);
}
.ie-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 16px; font-size: 13.5px; color: var(--hb-muted);
}
.ie-row + .ie-row { border-top: 1px solid var(--hb-border); }
.ie-row-value { flex-shrink: 0; font-weight: 600; color: var(--hb-heading); white-space: nowrap; }
/* The rounding row carries a sentence rather than a figure, so it may wrap —
   the Azerbaijani wording overflows a narrow screen otherwise. */
.ie-row-value.is-note { flex-shrink: 1; white-space: normal; text-align: right; }
.ie-row.is-total { background: rgba(151, 119, 250, 0.10); color: var(--hb-brand); font-weight: 700; }
.ie-row.is-total .ie-row-value { color: var(--hb-brand); font-weight: 700; }
.is-brand { color: var(--hb-brand) !important; }

/* ── Explainer ── */
.ie-explain-card {
  height: 100%; padding: 24px; border-radius: 16px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
}
.ie-explain-formula {
  display: block; margin-bottom: 18px; padding: 12px 14px; border-radius: 10px;
  background: rgba(151, 119, 250, 0.10); color: var(--hb-brand);
  font-family: "Montserrat", monospace; font-size: 13px; line-height: 1.6;
}
.ie-explain-lead { font-weight: 700; font-size: 14.5px; color: var(--hb-heading); margin-bottom: 12px; }
/* JobHub resets `ol, ul { list-style: none }` globally. */
.ie-explain-list, .ie-example-list { margin: 0; padding-left: 20px; list-style: disc outside; }
.ie-explain-list li, .ie-example-list li { font-size: 13.5px; line-height: 1.65; color: var(--hb-text); margin-bottom: 10px; }
.ie-explain-list li::marker, .ie-example-list li::marker { color: var(--hb-brand); }
.ie-example-list code {
  font-family: "Montserrat", monospace; font-size: 12.5px; color: var(--hb-heading);
  background: var(--hb-surface); border: 1px solid var(--hb-border);
  padding: 4px 9px; border-radius: 6px; display: inline-block;
}

/* ── Band descriptor scale ── */
.ie-scale {
  margin-top: 30px; border: 1px solid var(--hb-border); border-radius: 16px; overflow: hidden;
  background: var(--hb-card);
}
.ie-scale-head { padding: 22px 24px 18px; border-bottom: 1px solid var(--hb-border); background: var(--hb-surface); }
.ie-scale-head h3 { font-size: 19px; color: var(--hb-heading); margin: 0 0 6px; }
.ie-scale-head p { font-size: 13px; line-height: 1.6; color: var(--hb-muted); margin: 0; }
.ie-scale-row {
  display: grid; grid-template-columns: 64px 190px 1fr; align-items: center; gap: 16px;
  padding: 12px 24px;
}
.ie-scale-row + .ie-scale-row { border-top: 1px solid var(--hb-border); }
.ie-scale-band {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; padding: 6px 10px; border-radius: 999px;
  background: rgba(151, 119, 250, 0.12); color: var(--hb-brand);
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 14px;
}
.ie-scale-name { font-family: "Montserrat", sans-serif; font-weight: 600; font-size: 14px; color: var(--hb-heading); }
.ie-scale-text { font-size: 13px; line-height: 1.6; color: var(--hb-muted); }

.ie-disclaimer {
  max-width: 760px; margin: 26px auto 0; text-align: center;
  font-size: 12.5px; line-height: 1.7; color: var(--hb-muted);
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .ie-result { position: static; }
  .ie-scale-row { grid-template-columns: 56px 1fr; }
  .ie-scale-text { grid-column: 2; }
}
@media (max-width: 767px) {
  .ie-panel { padding: 24px 18px; }
  .ie-grid-2, .ie-cards { grid-template-columns: 1fr; }
  .ie-scale-row { padding: 12px 18px; }
}
@media (max-width: 575px) {
  /* Stacked, so the rounding sentence gets the full width instead of wrapping
     into a narrow three-line column. */
  .ie-row.is-note-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .ie-row.is-note-row .ie-row-value { text-align: left; }
}
