/* static/css/article_diagnosis-tool.css */

.diagnosis-panel {
  margin: 2rem 0;
  padding: 2.5rem;
  background: linear-gradient(180deg, #eef6ff 0%, #f8fbff 100%);
  border: 0.0625rem solid #cfe0f5;
  border-radius: 1.5rem;
  box-shadow: 0 0.75rem 2.5rem rgba(0,0,0,0.08);
}

.diagnosis-lead-box {
  position: relative;
  margin: 0 0 2rem;
  padding: 4.8rem 0 0;
  background: transparent;
}

.diagnosis-lead-box__label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);

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

  width: fit-content;

  padding: 0.75rem 1.6rem;

  border-radius: 999rem;

  background: #0b63ce;
  color: #ffffff;

  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.4;

  white-space: nowrap;

  box-shadow: 0 0.5rem 1.25rem rgba(11, 99, 206, 0.18);
}

.diagnosis-lead-box p {
  margin: 0;

  color: #10233f;

  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.9;

  text-align: center;
}

.diagnosis-lead-box p + p {
  margin-top: 0.35rem;
}

.diagnosis-box {
  margin: 0;
  padding: 0;
  background: transparent;
}

.diagnosis-question-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.diagnosis-question-card {
  padding: 1.125rem 1.25rem;

  background: #ffffff;

  border: 0.0625rem solid #dbe8f8;
  border-radius: 1rem;

  box-shadow: 0 0.25rem 0.875rem rgba(15, 92, 192, 0.04);
}

.diagnosis-question-title {
  margin: 0 0 1.125rem;

  padding-bottom: 0.625rem;

  border-bottom: 0.0625rem solid #dbe4ee;

  color: #1e293b;

  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
}

.diagnosis-answer-list {
  display: grid;
  gap: 0.625rem;
}

.diagnosis-answer-list label {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  padding: 0.75rem 0.9rem;

  background: #f8fbff;

  border: 0.0625rem solid #e3e8ef;
  border-radius: 0.75rem;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.diagnosis-answer-list label:hover {
  background: #eef6ff;
  border-color: #bfdbfe;
  transform: translateY(-0.0625rem);
}

.diagnosis-button-wrap {
  display: flex;
  justify-content: center;

  margin-top: 2rem;
}

.diagnosis-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 18rem;

  padding: 0.95rem 1.8rem;

  border: none;
  border-radius: 999rem;

  background: #ff6b35;
  color: #ffffff;

  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;

  cursor: pointer;

  box-shadow: 0 0.625rem 1.125rem rgba(255, 159, 28, 0.22);

  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease;
}

.diagnosis-button:hover {
  transform: translateY(-0.0625rem);
  opacity: 0.98;
}

.result {
  display: none;

  margin-top: 3rem;

  padding: 2rem;

  text-align: center;

  background: linear-gradient(180deg, #fff8e8 0%, #fffef9 100%);

  border: 0.0625rem solid #f0ddb3;
  border-radius: 1.35rem;

  box-shadow: 0 0.5rem 1.25rem rgba(194, 145, 51, 0.08);
}

.gauge {
  --score-deg: 0deg;
  --gauge-color: #6b7280;

  position: relative;

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

  width: 16.25rem;
  height: 16.25rem;

  margin: 0 auto 1.5rem;

  border-radius: 50%;

  background:
    conic-gradient(
      var(--gauge-color) 0deg,
      var(--gauge-color) var(--score-deg),
      #e7edf5 var(--score-deg)
    );

  transition: 1s ease;
}

.gauge::before {
  content: "";

  position: absolute;

  width: 11.5625rem;
  height: 11.5625rem;

  background: #ffffff;

  border-radius: 50%;
}

.gauge.low {
  --gauge-color: #6b7280;
}

.gauge.middle {
  --gauge-color: #d18b00;
}

.gauge.high {
  --gauge-color: #0d9b47;
}

.score-text {
  position: relative;
  z-index: 2;
}

.score-number {
  color: #10233f;

  font-size: 3.25rem;
  font-weight: 700;
}

.score-label {
  margin-top: 0.5rem;

  font-size: 1.25rem;
  font-weight: 700;
}

.low {
  color: #6b7280;
}

.middle {
  color: #d18b00;
}

.high {
  color: #0d9b47;
}

.comment {
  display: block;

  margin-top: 1.75rem;

  padding: 1rem 1.25rem;

  text-align: left;

  background: #ffffff;

  border: 0.0625rem solid #e7e3d8;
  border-radius: 1rem;

  color: #334155;

  font-size: 1.05rem;
  line-height: 1.9;

  box-shadow: 0 0.375rem 1.125rem rgba(30, 41, 59, 0.04);
}

.diagnosis-advice-list {
  margin: 1.25rem 0 0;

  padding-left: 1.5rem;
}

.diagnosis-advice-list li {
  margin-bottom: 0.9rem;

  line-height: 1.9;
}

@media (max-width: 48rem) {

  .diagnosis-panel {
    padding: 1.25rem;
  }

  .diagnosis-lead-box {
    padding-top: 5rem;
  }

  .diagnosis-lead-box__label {
    width: calc(100% - 2rem);

    font-size: 1.2rem;
  }

  .diagnosis-lead-box p {
    font-size: 1rem;
    text-align: left;
  }

  .diagnosis-question-grid {
    grid-template-columns: 1fr;
  }

  .diagnosis-button {
    width: 100%;
    min-width: auto;
  }

  .result {
    padding: 1.5rem 1rem;
  }

  .gauge {
    width: 13.5rem;
    height: 13.5rem;
  }

  .gauge::before {
    width: 9.6rem;
    height: 9.6rem;
  }

}