/**
 * Dashboard Cardio - Estilos Customizados
 */

/* Hero Section - Progresso da Meta */
.cardio-hero-section {
  margin-bottom: 2rem;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Círculo de Progresso */
.progress-circle-container {
  display: inline-block;
  position: relative;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 8;
  fill: transparent;
}

.progress-ring-fill {
  stroke: white;
  stroke-width: 8;
  fill: transparent;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease-in-out;
}

.progress-text {
  color: white;
  text-align: center;
}

.progress-text .current-km {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0;
}

.progress-text .target-km {
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.progress-text .percentage {
  font-size: 0.9rem;
  opacity: 0.75;
  line-height: 1;
}

/* Stat Cards */
.stat-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
  transform: translateY(-2px);
  background-color: rgba(255, 255, 255, 0.3) !important;
}

.stat-card i {
  opacity: 0.7;
  font-size: 2.5rem;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Cards do Dashboard */
.card {
  border-radius: 15px;
  overflow: hidden;
}

.card-header {
  border-radius: 15px 15px 0 0;
}

/* Templates */
.template-btn {
  background: rgba(25, 135, 84, 0.1);
  border: 1px solid rgba(25, 135, 84, 0.2);
  color: #198754;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.template-btn:hover {
  background: rgba(25, 135, 84, 0.15);
  border-color: rgba(25, 135, 84, 0.3);
  transform: translateY(-1px);
}

/* Estatísticas */
.stat-item {
  padding: 0.75rem;
  background: rgba(108, 117, 125, 0.1);
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(108, 117, 125, 0.15);
  transform: translateY(-2px);
}

.stat-item i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.stat-description {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Log Timeline */
.timeline-item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 1rem;
}

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 36px;
  width: 2px;
  height: calc(100% - 20px);
  background: rgba(108, 117, 125, 0.2);
}

.timeline-badge {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  line-height: 1;
}

.timeline-content {
  background: rgba(248, 249, 250, 0.8);
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.timeline-day {
  font-size: 0.6rem;
  line-height: 0.8;
  margin-bottom: 2px;
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 0.8;
}

/* Responsividade Mobile */
@media (max-width: 991px) {
  .cardio-hero-section .row {
    text-align: center;
  }

  .cardio-hero-section .col-md-8 {
    margin-top: 1.5rem;
  }

  .progress-circle-container {
    margin-bottom: 1rem;
  }

  .stat-card {
    margin-bottom: 0.75rem;
  }

  .progress-text .current-km {
    font-size: 2rem;
  }

  /* Cards em coluna única */
  .row.g-4 .col-lg-4 {
    margin-bottom: 1rem;
  }

  /* Reduzir padding dos cards */
  .card-body {
    padding: 1rem;
  }

  /* Templates em grid 2x2 */
  .template-btn {
    font-size: 0.9rem;
    padding: 0.5rem;
  }

  /* Estatísticas em grid */
  .stat-item {
    padding: 0.5rem;
  }

  .stat-item i {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .cardio-hero-section {
    margin-bottom: 1rem;
  }

  .progress-ring {
    width: 120px;
    height: 120px;
  }

  .progress-ring circle {
    cx: 60;
    cy: 60;
    r: 50;
  }

  .progress-text .current-km {
    font-size: 1.8rem;
  }

  .stat-card i {
    font-size: 2rem;
  }

  .stat-number {
    font-size: 1.2rem;
  }

  /* Hero section mais compacta */
  .cardio-hero-section .card-body {
    padding: 1.5rem 1rem;
  }

  /* Forms mais compactos */
  .form-control {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  /* Templates em lista vertical */
  .template-btn {
    margin-bottom: 0.25rem;
    padding: 0.4rem;
    font-size: 0.8rem;
  }

  /* Timeline mais compacta */
  .timeline-item {
    padding-left: 2.5rem;
    padding-bottom: 0.75rem;
  }

  .timeline-badge {
    width: 30px;
    height: 30px;
    font-size: 0.65rem;
  }

  .timeline-content {
    padding: 0.5rem;
  }

  /* Estatísticas em grid 2x2 */
  .stat-item {
    padding: 0.4rem;
  }

  .stat-value {
    font-size: 1rem;
  }

  .stat-description {
    font-size: 0.75rem;
  }
}

/* Animações */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Loading states */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Hover effects */
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
  transition: all 0.3s ease;
}

.btn {
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

/* Form improvements */
.form-control {
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  transform: translateY(-1px);
}

/* Success states */
.success-glow {
  animation: successGlow 0.6s ease-in-out;
}

@keyframes successGlow {
  0% {
    box-shadow: 0 0 5px rgba(25, 135, 84, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(25, 135, 84, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(25, 135, 84, 0.5);
  }
}
