/* ============================================================
   깨알도구
   목표 달성 페이스 계산기 전용 CSS

   공통:
   ../../css/tool-common.css
   ============================================================ */

/* ============================================================
   PAGE
   ============================================================ */

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

/* ============================================================
   CALCULATOR
   ============================================================ */

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

/* ============================================================
   INPUT
   ============================================================ */

.goal-value-grid,
.period-input-grid {
  display: grid;

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

  gap: 8px;
}

.period-section-title {
  margin-top: 4px;
}

/* ============================================================
   STATUS
   ============================================================ */

.goal-status {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 12px;

  border-radius: 12px;

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

.goal-status-icon {
  display: flex;

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

  width: 40px;
  height: 40px;

  flex: 0 0 40px;

  border-radius: 10px;

  background: #ffffff;

  font-size: 20px;
}

.goal-status-copy {
  min-width: 0;
}

.goal-status-copy strong {
  display: block;

  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

.goal-status-copy span {
  display: block;

  margin-top: 3px;

  color: var(--text-soft);

  font-size: 12px;

  line-height: 1.5;
}

/* ============================================================
   STATUS TYPES
   ============================================================ */

.goal-status.ahead {
  background: #f3f8ee;
}

.goal-status.behind {
  background: #fff5ed;
}

.goal-status.achieved {
  background: #fff7dc;
}

.goal-status.start {
  background: #f5f4ef;
}

/* ============================================================
   PROGRESS
   ============================================================ */

.progress-section {
  margin-top: 16px;
}

.progress-head {
  display: flex;

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

  gap: 10px;

  margin-bottom: 6px;

  color: var(--text-soft);

  font-size: 12px;
}

.progress-head strong {
  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

.progress-track {
  position: relative;

  width: 100%;
  height: 10px;

  overflow: hidden;

  border-radius: 999px;

  background: #ebe9e2;
}

.progress-fill {
  width: 0;
  height: 100%;

  border-radius: inherit;

  transition: width 0.35s ease;
}

.achievement-fill {
  background: var(--brand);
}

.time-fill {
  background: var(--accent);
}

/* ============================================================
   RESULT GRID
   ============================================================ */

.goal-result-grid {
  margin-top: 18px;
}

/* ============================================================
   FORECAST
   ============================================================ */

.forecast-box {
  margin-top: 14px;

  padding: 11px 12px;

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

  border-radius: 11px;

  background: #ffffff;
}

.forecast-title {
  margin-bottom: 5px;

  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

.forecast-row {
  display: flex;

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

  gap: 10px;

  min-height: 34px;

  border-bottom: 1px solid #efeee9;
}

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

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

  font-size: 12px;
}

.forecast-row strong {
  max-width: 58%;

  color: var(--text);

  font-size: 12px;

  font-weight: 800;

  text-align: right;

  overflow-wrap: anywhere;
}

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

@media (max-width: 520px) {
  .goal-value-grid,
  .period-input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .goal-status {
    padding: 10px;
  }

  .goal-status-icon {
    width: 36px;
    height: 36px;

    flex-basis: 36px;

    font-size: 18px;
  }
}
