/*
 * Shared premium result-panel standard.
 * Link this file after each calculator page's own styles so new tools inherit
 * the same colorful presentation, readable type scale, and light-theme support.
 */

.result-panel {
  background:
    radial-gradient(circle at 12% 5%, rgba(244, 189, 70, .17), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(74, 154, 255, .14), transparent 27%),
    radial-gradient(circle at 88% 88%, rgba(171, 103, 255, .11), transparent 32%),
    linear-gradient(180deg, rgba(13, 16, 20, .995), rgba(5, 7, 10, .995));
}

.result-content {
  position: relative;
  z-index: 2;
}

.result-content::before {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  margin: 0 0 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f4bd46, #ff8f57, #ac78ff, #56b8ff, #64d39b);
  box-shadow: 0 0 22px rgba(116, 170, 255, .28);
}

.result-panel .panel-kicker {
  font-size: 12.5px;
}

.result-number {
  display: inline-block;
  background: linear-gradient(105deg, #ffe486 0%, #f4bd46 42%, #ff8f57 72%, #c58cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(244, 189, 70, .16));
}

.result-number .result-unit {
  font-size: 17px;
  color: #eac86d;
  -webkit-text-fill-color: #eac86d;
  filter: none;
}

.result-category {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(244, 189, 70, .26);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(244, 189, 70, .13), rgba(255, 143, 87, .07));
  color: #fff2c6;
  font-size: 21px;
  line-height: 1.25;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}

.result-sentence {
  padding-left: 12px;
  border-left: 2px solid rgba(86, 184, 255, .55);
  font-size: 15.5px;
  line-height: 1.68;
}

.fact {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--fact-accent) 25%, transparent) !important;
}

.fact::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--fact-accent);
  box-shadow: 0 0 14px var(--fact-accent);
}

.fact:nth-child(1) {
  --fact-accent: #56b8ff;
  background: linear-gradient(145deg, rgba(86, 184, 255, .12), rgba(86, 184, 255, .025));
}

.fact:nth-child(2) {
  --fact-accent: #ac78ff;
  background: linear-gradient(145deg, rgba(172, 120, 255, .12), rgba(172, 120, 255, .025));
}

.fact:nth-child(3) {
  --fact-accent: #64d39b;
  background: linear-gradient(145deg, rgba(100, 211, 155, .12), rgba(100, 211, 155, .025));
}

.fact:nth-child(4) {
  --fact-accent: #ffac5f;
  background: linear-gradient(145deg, rgba(255, 172, 95, .12), rgba(255, 172, 95, .025));
}

.fact span {
  color: var(--fact-accent) !important;
  font-size: 11.5px;
  line-height: 1.35;
}

.fact strong {
  color: #f7f9fb;
  font-size: 15.5px;
  line-height: 1.4;
}

.energy-row {
  --row-accent: #56b8ff;
  position: relative;
  min-height: 44px;
  border-left: 3px solid var(--row-accent) !important;
  background: linear-gradient(90deg, color-mix(in srgb, var(--row-accent) 11%, transparent), rgba(255, 255, 255, .012));
  font-size: 13px;
  line-height: 1.45;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.energy-row:nth-child(1) { --row-accent: #56b8ff; }
.energy-row:nth-child(2) { --row-accent: #f4bd46; }
.energy-row:nth-child(3) { --row-accent: #55d4ce; }
.energy-row:nth-child(4) { --row-accent: #ff866f; }
.energy-row:nth-child(5) { --row-accent: #9a83ff; }

.energy-row strong {
  color: var(--row-accent) !important;
  font-size: 13.5px;
  line-height: 1.4;
  text-shadow: 0 0 14px color-mix(in srgb, var(--row-accent) 28%, transparent);
}

.result-note {
  border: 1px solid rgba(244, 189, 70, .17);
  border-left: 3px solid #f4bd46;
  border-radius: 11px;
  background: linear-gradient(100deg, rgba(244, 189, 70, .09), rgba(86, 184, 255, .045) 58%, rgba(172, 120, 255, .045));
  color: #b9c2ce;
  font-size: 13.5px;
  line-height: 1.68;
}

.result-action-btn {
  min-height: 46px;
  font-size: 13px;
}

.result-action-btn:nth-child(1) {
  border-color: rgba(86, 184, 255, .30);
  background: rgba(86, 184, 255, .055);
}

.result-action-btn:nth-child(2) {
  border-color: rgba(244, 189, 70, .30);
  background: rgba(244, 189, 70, .055);
}

.result-action-btn:nth-child(3) {
  border-color: rgba(172, 120, 255, .30);
  background: rgba(172, 120, 255, .055);
}

.result-action-btn:nth-child(1):hover:not(:disabled) {
  color: #8ed0ff;
  border-color: rgba(86, 184, 255, .55);
  background: rgba(86, 184, 255, .10);
}

.result-action-btn:nth-child(2):hover:not(:disabled) {
  color: #ffd66f;
  border-color: rgba(244, 189, 70, .55);
  background: rgba(244, 189, 70, .10);
}

.result-action-btn:nth-child(3):hover:not(:disabled) {
  color: #c8a9ff;
  border-color: rgba(172, 120, 255, .55);
  background: rgba(172, 120, 255, .10);
}

.result-action-status {
  font-size: 12.5px;
}

/* BMI-specific result visualization. */
.bmi-scale {
  height: 13px;
  margin-top: 22px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: #11151a;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25), 0 0 24px rgba(86, 184, 255, .08);
}

.scale-under { background: linear-gradient(90deg, #477fc7, #62a9e8); }
.scale-healthy { background: linear-gradient(90deg, #4fbd83, #72d29d); }
.scale-over { background: linear-gradient(90deg, #e5ad4a, #f4c763); }
.scale-obese { background: linear-gradient(90deg, #e27867, #c44c66); }

.scale-pointer {
  top: -8px;
  height: 29px;
  background: #fff7dc;
  box-shadow: 0 0 0 3px rgba(255, 240, 186, .18), 0 0 14px rgba(255, 214, 111, .8);
}

.scale-labels {
  color: #aab2bd;
  font-size: 11.5px;
}

html[data-theme="light"] .result-panel {
  background:
    radial-gradient(circle at 12% 5%, rgba(244, 189, 70, .23), transparent 29%),
    radial-gradient(circle at 92% 12%, rgba(74, 154, 255, .18), transparent 28%),
    radial-gradient(circle at 88% 88%, rgba(171, 103, 255, .12), transparent 33%),
    linear-gradient(180deg, #fff, #edf3f9);
}

html[data-theme="light"] .result-number {
  background: linear-gradient(105deg, #8b5800 0%, #bd7200 42%, #c95d31 70%, #7545a1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .result-number .result-unit {
  color: #805300;
  -webkit-text-fill-color: #805300;
}

html[data-theme="light"] .result-category {
  color: #473000;
  border-color: rgba(183, 121, 8, .26);
  background: linear-gradient(90deg, rgba(255, 226, 142, .75), rgba(255, 193, 148, .38));
}

html[data-theme="light"] .result-sentence {
  color: #4f5d6d;
  border-left-color: rgba(49, 116, 180, .46);
}

html[data-theme="light"] .fact strong { color: #17212d; }

html[data-theme="light"] .energy-row {
  background: linear-gradient(90deg, color-mix(in srgb, var(--row-accent) 15%, white), rgba(255, 255, 255, .88));
}

html[data-theme="light"] .energy-row span { color: #4f5c6c; }

html[data-theme="light"] .result-note {
  color: #4f5c6c;
  background: linear-gradient(100deg, rgba(255, 236, 180, .75), rgba(221, 239, 255, .68) 58%, rgba(238, 225, 255, .58));
}

html[data-theme="light"] .result-action-btn:nth-child(1) { background: rgba(86, 184, 255, .10); }
html[data-theme="light"] .result-action-btn:nth-child(2) { background: rgba(244, 189, 70, .11); }
html[data-theme="light"] .result-action-btn:nth-child(3) { background: rgba(172, 120, 255, .10); }

html[data-theme="light"] .bmi-scale {
  border-color: rgba(38, 55, 76, .16);
  background: #dfe7ef;
  box-shadow: 0 8px 20px rgba(52, 72, 96, .12), 0 0 22px rgba(49, 116, 180, .10);
}

html[data-theme="light"] .scale-labels { color: #566474; }

@media (max-width: 720px) {
  .tool-shell { overflow-x: clip; }
  .result-category { font-size: 19px; }
  .result-sentence { font-size: 15px; }
  .fact strong { font-size: 15px; }
  .energy-row { align-items: flex-start; }
  .energy-row strong { text-align: right; }
}
