/*
 * Dashboard Components CSS
 * Reusable styles for all dashboard pages
 * Based on Kids template design patterns
 */

/* ==========================
   Dashboard Header Section
   ========================== */
.dashboard-header {
  background: #f8f9fa; /* bg-light color to differentiate from white background */
  border-radius: 0.94rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

@media (min-width: 768px) {
  .dashboard-header {
    padding: 2rem 2.5rem;
    margin-bottom: 2.0rem;
  }
}

/* Dashboard header buttons - responsive layout */
.dashboard-header-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dashboard-header-buttons .btn {
  flex: 1; /* Make all buttons equal width */
  white-space: nowrap; /* Prevent text wrapping */
}

/* Keep buttons stacked vertically on tablet (md) and large (lg) sizes */
@media (min-width: 768px) {
  .dashboard-header-buttons {
    gap: 0.65rem;
  }
}

/* Switch to horizontal layout only on extra-large screens (xl) and up */
@media (min-width: 1200px) {
  .dashboard-header-buttons {
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.75rem;
  }
}

/* ==========================
   Dashboard Statistics Cards
   ========================== */
.dashboard-stats-card {
  margin-bottom: 0; /* Remove extra margin, using row gutters instead */
  height: 100%; /* Ensure wrapper takes full height */
}

.dashboard-stats-card .card {
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
  position: relative;
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Make all cards same height */
  display: flex;
  flex-direction: column;
}

.dashboard-stats-card .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.15);
}

.dashboard-stats-card .card-body {
  padding: 0;
  padding-bottom: 0.75rem;
  flex: 1; /* Allow body to grow and maintain equal heights */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

@media (min-width: 768px) {
  .dashboard-stats-card .card-body {
    padding-bottom: 1rem;
  }
}

/* Circular Icon Badge */
.card-icon-border-large {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  background-color: #fff;
  border: 4px solid;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 52px;
  color: #666;
  margin-top: -1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .card-icon-border-large {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
    line-height: 62px;
    margin-top: -2.2rem;
  }
}

/* Counter Display */
.counter-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  padding: 0.5rem 0 0.15rem 0;
  margin: 0;
  font-family: 'Dosis', sans-serif;
}

@media (min-width: 768px) {
  .counter-value {
    font-size: 1.75rem;
  }
}

/* Stat Label */
.stat-label {
  display: inline-block;
  color: #fff;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 0.25rem;
  margin-top: 0.1rem;
  padding: 0.3rem 0.6rem;
  margin-bottom: 0.35rem;
  font-size: 0.938rem;
}

/* Stat Detail (small text under value) */
.stat-detail {
  display: inline-block;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  padding: 0.1rem 0.4rem;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
}

/* Section Title with Decorative Shapes */
.dashboard-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .dashboard-section-title {
    margin-bottom: 2rem;
  }
}

.dashboard-section-title h2 {
  margin: 0;
  padding: 0 1rem;
  font-family: 'Dosis', sans-serif;
  font-weight: 600;
}

.dashboard-section-title .shape {
  width: 50px;
  height: 4px;
  border-radius: 2px;
}

@media (min-width: 768px) {
  .dashboard-section-title .shape {
    width: 80px;
  }
}

/* ==========================
   Media Objects (Feature Lists)
   ========================== */
.dashboard-media {
  margin-bottom: 2rem;
}

.dashboard-media-icon {
  width: 76px;
  height: 76px;
  padding: 0.375rem;
  box-shadow: 0.25rem 0.25rem 0 rgba(0, 0, 0, 0.1);
  display: block;
  margin-right: 0.94rem;
  border-radius: 50%;
}

.dashboard-media-icon i {
  width: 62px;
  height: 62px;
  line-height: 62px;
  border-radius: 50%;
  text-align: center;
  border: 2px solid #fff;
  font-size: 1.38rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================
   Button Styles
   ========================== */
.btn-dashboard {
  border: none;
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-dashboard:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  color: white;
}

/* ==========================
   Utility Classes
   ========================== */
.text-shadow-sm {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.box-shadow-card {
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

/* ==========================
   Responsive Adjustments
   ========================== */
@media (max-width: 767.98px) {
  .dashboard-header {
    text-align: center;
  }

  .dashboard-header .btn-dashboard {
    margin-top: 1rem;
    width: 100%;
  }

  .counter-value {
    font-size: 2rem;
  }

  .card-icon-border-large {
    width: 80px;
    height: 80px;
    font-size: 1.5rem;
    line-height: 70px;
    margin-top: -2.5rem;
  }
}

/* ==========================
   Color-Specific Borders
   (Following Bootstrap color variables)
   ========================== */
.border-primary.card-icon-border-large {
  border-color: var(--bs-primary);
}

.border-success.card-icon-border-large {
  border-color: var(--bs-success);
}

.border-danger.card-icon-border-large {
  border-color: var(--bs-danger);
}

.border-info.card-icon-border-large {
  border-color: var(--bs-info);
}

.border-warning.card-icon-border-large {
  border-color: var(--bs-warning);
}

.border-purple.card-icon-border-large {
  border-color: #a597e7;
}

.border-pink.card-icon-border-large {
  border-color: #ea77ad;
}

/* Background colors for custom colors not in Bootstrap */
.bg-purple {
  background-color: #a597e7 !important;
}

.bg-pink {
  background-color: #ea77ad !important;
}

.text-purple {
  color: #a597e7 !important;
}

.text-pink {
  color: #ea77ad !important;
}
