/* ============================================================
 * Dr. Totoli incluído no App Fórmulas — card da home e resultado do onboarding.
 * Estilos isolados (prefixo .coach-) para não mexer no layout atual.
 * ============================================================ */

.coach-free-slot {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 0;
}

.coach-free-slot[hidden],
.coach-card[hidden],
.coach-chip[hidden] {
  display: none !important;
}

.coach-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(13, 162, 231, 0.16) 0%,
      transparent 52%
    ),
    linear-gradient(135deg, rgba(9, 17, 32, 0.97), rgba(5, 11, 21, 0.99));
  border: 1px solid rgba(13, 162, 231, 0.32);
  border-radius: 16px;
  padding: 22px;
  color: var(--text, #f8fafc);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: coachCardIn 0.28s ease both;
}

.coach-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan, #0da2e7), transparent 70%);
  opacity: 0.9;
}

.coach-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.coach-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--cyan, #0da2e7);
  background: rgba(13, 162, 231, 0.1);
  border: 1px solid rgba(13, 162, 231, 0.3);
  border-radius: 999px;
  padding: 5px 11px;
}

.coach-card-title {
  margin: 0 0 8px;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #fff;
}

.coach-card-text {
  margin: 0;
  max-width: 640px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted, #94a3b8);
}

.coach-points {
  list-style: none;
  display: grid;
  gap: 7px;
  margin: 14px 0 18px;
  padding: 0;
}

.coach-points li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #cfd9ec;
}

.coach-points li::before {
  content: "✓";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 162, 231, 0.14);
  color: var(--cyan, #0da2e7);
  font-size: 10px;
  font-weight: 900;
  margin-top: 1px;
}

.coach-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.coach-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 260px;
  min-height: 46px;
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0da2e7, #0878b5);
  color: #04121f;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(13, 162, 231, 0.24);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.coach-btn-primary:hover {
  color: #04121f;
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 12px 28px rgba(13, 162, 231, 0.34);
}

.coach-btn-primary:active {
  transform: translateY(0);
}

.coach-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  background: transparent;
  color: #aab5c9;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.coach-btn-secondary:hover {
  color: #fff;
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.04);
}

.coach-disclaimer {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #6b7590;
}

.coach-card-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #7d89a4;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.coach-card-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* Card compacto no canto: reabre o card depois do "Agora não". */
.coach-chip {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 850;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid rgba(13, 162, 231, 0.45);
  border-radius: 999px;
  background: rgba(7, 15, 29, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #e8f4ff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(13, 162, 231, 0.1);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.coach-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(13, 162, 231, 0.8);
  background: rgba(10, 24, 44, 0.98);
}

.coach-chip:active {
  transform: translateY(0);
}

/* Na tela de detalhe o FAB "Objetivos" ocupa o canto; sobe o chip. */
body.detail-active .coach-chip {
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

.coach-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
  flex: 0 0 auto;
}

/* Resultado do onboarding: painel dentro do overlay existente. */
.coach-result-card {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto;
  animation: coachCardIn 0.28s ease both;
}

.coach-result-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 14px;
  background: rgba(13, 162, 231, 0.12);
  border: 1px solid rgba(13, 162, 231, 0.32);
  color: var(--cyan, #0da2e7);
  font-size: 22px;
}

.coach-result-loading {
  margin: 0;
  font-size: 13px;
  color: var(--muted, #94a3b8);
}

.coach-result-error {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #fca5a5;
}

@keyframes coachCardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .coach-free-slot {
    padding: 14px 12px 0;
  }

  .coach-card {
    padding: 18px 16px;
    border-radius: 14px;
  }

  .coach-card-title {
    font-size: 19px;
  }

  .coach-card-text {
    font-size: 13px;
  }

  .coach-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .coach-btn-primary,
  .coach-btn-secondary {
    flex: 1 1 auto;
    width: 100%;
  }

  .coach-result-card {
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .coach-chip {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .coach-card,
  .coach-result-card,
  .coach-chip,
  .coach-btn-primary {
    animation: none;
    transition: none;
  }
}
