/* ============================================================
   깨알도구
   손익분기점 계산기
   tool.css
   ============================================================ */

.tool-page {
  --tool-page-max-width: 960px;
}

.bep-calculator {
  align-items: start;
}

/* ============================================================
   SECTION
   ============================================================ */

.sales-title,
.target-title {
  margin-top: 6px;
}

.optional-label,
.optional-section-label {
  display: inline-block;

  margin-left: 4px;

  padding: 1px 5px;

  border-radius: 999px;

  background: var(--surface-soft);

  color: var(--text-soft);

  font-size: 12px;

  font-weight: 700;

  vertical-align: middle;
}

/* ============================================================
   MAIN RESULT
   ============================================================ */

.bep-main-value {
  display: flex;

  align-items: baseline;

  gap: 5px;

  margin-top: 3px;
}

.bep-main-value strong {
  color: var(--brand);

  font-size: var(--tool-result-main-size);

  font-weight: 900;

  line-height: 1.15;

  letter-spacing: -1px;
}

.bep-main-value span {
  color: var(--text-soft);

  font-size: 12px;

  font-weight: 800;
}

/* ============================================================
   CORE RESULT
   ============================================================ */

.bep-core-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 7px;

  margin-top: 15px;
}

.bep-core-card {
  min-width: 0;

  padding: 13px 9px;

  border: 1px solid var(--line);

  border-radius: 11px;

  background: #fff;

  text-align: center;
}

.bep-core-card span {
  display: block;

  color: var(--text-soft);

  font-size: 12px;
}

.bep-core-card strong {
  display: block;

  margin-top: 4px;

  color: var(--brand);

  font-size: 15px;

  font-weight: 900;

  overflow-wrap: anywhere;
}

/* ============================================================
   DETAIL RESULT
   ============================================================ */

.bep-result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));

  margin-top: 10px;
}

/* ============================================================
   TARGET PROFIT
   ============================================================ */

.target-profit-box {
  margin-top: 13px;

  padding: 12px;

  border: 1px solid var(--line);

  border-radius: 11px;

  background: #fff;
}

.target-profit-head {
  margin-bottom: 9px;
}

.target-profit-head span {
  display: block;

  color: var(--text-soft);

  font-size: 12px;
}

.target-profit-head strong {
  display: block;

  margin-top: 3px;

  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

.target-profit-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 7px;
}

.target-profit-grid > div {
  min-width: 0;

  padding: 9px;

  border-radius: 9px;

  background: var(--surface-soft);

  text-align: center;
}

.target-profit-grid span {
  display: block;

  color: var(--text-soft);

  font-size: 12px;
}

.target-profit-grid strong {
  display: block;

  margin-top: 3px;

  color: var(--brand);

  font-size: 12px;

  font-weight: 900;

  overflow-wrap: anywhere;
}

/* ============================================================
   STRUCTURE
   ============================================================ */

.bep-structure-box {
  margin-top: 13px;

  padding: 11px 12px;

  border-radius: 11px;

  background: var(--surface-soft);
}

.bep-structure-title {
  margin-bottom: 4px;

  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

.bep-structure-row {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 10px;

  min-height: 29px;

  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.bep-structure-row:last-child {
  border-bottom: 0;
}

.bep-structure-row span {
  color: var(--text-soft);

  font-size: 12px;
}

.bep-structure-row strong {
  color: var(--text);

  font-size: 12px;

  font-weight: 900;

  text-align: right;
}

.bep-structure-row.contribution-row {
  margin-top: 2px;
}

.bep-structure-row.contribution-row strong {
  color: var(--brand);

  font-size: 12px;
}

/* ============================================================
   FORMULA
   ============================================================ */

.bep-formula-box {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 10px;

  margin-top: 11px;

  padding: 9px 10px;

  border-radius: 9px;

  background: var(--surface-soft);
}

.bep-formula-box span {
  color: var(--text-soft);

  font-size: 12px;
}

.bep-formula-box strong {
  color: var(--text);

  font-size: 12px;

  font-weight: 900;

  text-align: right;
}

/* ============================================================
   GUIDE
   ============================================================ */

.bep-guide-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 8px;

  margin-top: 12px;
}

.bep-guide-note {
  margin-top: 12px;

  padding: 11px 12px;

  border-radius: 10px;

  background: var(--surface-soft);
}

.bep-guide-note strong {
  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

.bep-guide-note p {
  margin: 5px 0 0;

  color: var(--text-soft);

  font-size: 12px;

  line-height: 1.6;
}

/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 820px) {
  .bep-calculator {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 560px) {
  .bep-core-card strong {
    font-size: 13px;
  }

  .bep-main-value strong {
    font-size: 29px;
  }

  .bep-guide-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   VERY SMALL
   ============================================================ */

@media (max-width: 380px) {
  .target-profit-grid {
    grid-template-columns: 1fr;
  }
}
