/* Growth / traffic pages: matcher, calendar, profile, safety, cost, symptom */

.pet-seasonal-growth__badge {
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color, #c4784a), #8b5a3c);
  flex-shrink: 0;
}

@supports (background: color-mix(in srgb, #000 10%, #fff 90%)) {
  .pet-seasonal-growth__badge {
    background: linear-gradient(135deg, var(--primary-color, #c4784a), color-mix(in srgb, var(--primary-color, #c4784a) 65%, #8b5a3c));
  }
}

.pet-growth-panel {
  background: var(--card-bg, #fff);
}

.pet-matcher-cards,
.pet-safety-grid,
.pet-local-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.pet-matcher-card,
.pet-safety-card,
.pet-local-card,
.pet-profile-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.85rem;
  padding: 1rem;
  background: var(--card-bg, #fff);
}

.pet-profile-card.is-active {
  border-color: var(--primary-color, #c4784a);
  box-shadow: 0 0 0 1px var(--gray-200, #e5e7eb);
}

@supports (background: color-mix(in srgb, #000 10%, #fff 90%)) {
  .pet-profile-card.is-active {
    border-color: color-mix(in srgb, var(--primary-color, #c4784a) 55%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary-color, #c4784a) 25%, transparent);
  }
}

.pet-safety-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.pet-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.pet-cal-cell {
  aspect-ratio: 1;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: var(--card-bg, #fff);
}

.pet-cal-cell.is-empty {
  visibility: hidden;
}

.pet-cal-cell.has-event {
  background: #f5ebe3;
  border-color: var(--primary-color, #c4784a);
  font-weight: 700;
}

@supports (background: color-mix(in srgb, #000 10%, #fff 90%)) {
  .pet-cal-cell.has-event {
    background: color-mix(in srgb, var(--primary-color, #c4784a) 18%, #fff);
    border-color: color-mix(in srgb, var(--primary-color, #c4784a) 40%, transparent);
  }
}

.pet-calendar-list__item {
  padding: 0.45rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
  font-size: 0.9rem;
}

.pet-symptom-choice {
  text-align: left;
  white-space: normal;
}

.pet-symptom-result {
  padding: 0.25rem 0;
}

.pet-poster-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(20, 16, 12, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease, background-color 0.28s ease;
}

.pet-poster-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  background: rgba(20, 16, 12, 0.55);
}

.pet-poster-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 1rem;
  padding: 1rem;
  max-width: min(92vw, 420px);
  width: 100%;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.pet-poster-modal.is-open .pet-poster-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.pet-poster-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
}

.pet-poster-modal__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.65rem;
}

@media (prefers-reduced-motion: reduce) {
  .pet-poster-modal,
  .pet-poster-modal__dialog {
    transition: none;
  }

  .pet-poster-modal__dialog {
    transform: none;
  }
}

.pet-tool-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.pet-growth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

@media (max-width: 575.98px) {
  .pet-calendar-grid {
    gap: 0.2rem;
  }

  .pet-cal-cell {
    font-size: 0.75rem;
  }
}

html.dark-mode-active .pet-matcher-card,
html.dark-mode-active .pet-safety-card,
html.dark-mode-active .pet-local-card,
html.dark-mode-active .pet-profile-card,
[data-theme="dark"] .pet-matcher-card,
[data-theme="dark"] .pet-safety-card,
[data-theme="dark"] .pet-local-card,
[data-theme="dark"] .pet-profile-card,
[data-bs-theme="dark"] .pet-matcher-card,
[data-bs-theme="dark"] .pet-safety-card,
[data-bs-theme="dark"] .pet-local-card,
[data-bs-theme="dark"] .pet-profile-card {
  background: var(--card-bg, #1e1a17);
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark-mode-active .pet-growth-panel,
html.dark-mode-active .pet-growth-panel.card,
[data-theme="dark"] .pet-growth-panel,
[data-theme="dark"] .pet-growth-panel.card {
  background: var(--card-bg, #1e1a17);
  color: var(--text-color, #f3e9df);
}

html.dark-mode-active .pet-cal-cell,
[data-theme="dark"] .pet-cal-cell {
  background: color-mix(in srgb, var(--card-bg, #1e1a17) 88%, #ffffff 12%);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-color, #f3e9df);
}

html.dark-mode-active .pet-cal-cell.has-event,
[data-theme="dark"] .pet-cal-cell.has-event {
  background: color-mix(in srgb, var(--primary-color, #d4a373) 28%, var(--card-bg, #1e1a17));
  border-color: color-mix(in srgb, var(--primary-color, #d4a373) 45%, transparent);
}

html.dark-mode-active .pet-calendar-list__item,
[data-theme="dark"] .pet-calendar-list__item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html.dark-mode-active .pet-poster-modal__dialog,
[data-theme="dark"] .pet-poster-modal__dialog {
  background: var(--card-bg, #1e1a17);
  color: var(--text-color, #f3e9df);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

html.dark-mode-active .pet-matcher-form .form-select,
html.dark-mode-active .pet-matcher-form .form-control,
html.dark-mode-active [data-cost-form] .form-select,
html.dark-mode-active [data-cost-form] .form-control,
[data-theme="dark"] .pet-matcher-form .form-select,
[data-theme="dark"] .pet-matcher-form .form-control,
[data-theme="dark"] [data-cost-form] .form-select,
[data-theme="dark"] [data-cost-form] .form-control {
  background-color: color-mix(in srgb, var(--card-bg, #1e1a17) 85%, #000 15%);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-color, #f3e9df);
}

html.dark-mode-active .pet-symptom-result,
html.dark-mode-active [data-matcher-result],
html.dark-mode-active [data-cost-result],
[data-theme="dark"] .pet-symptom-result,
[data-theme="dark"] [data-matcher-result],
[data-theme="dark"] [data-cost-result] {
  color: var(--text-color, #f3e9df);
}

@supports (background: color-mix(in srgb, #000 10%, #fff 90%)) {
  html.dark-mode-active .pet-matcher-card,
  html.dark-mode-active .pet-safety-card,
  html.dark-mode-active .pet-local-card,
  html.dark-mode-active .pet-profile-card,
  [data-theme="dark"] .pet-matcher-card,
  [data-theme="dark"] .pet-safety-card,
  [data-theme="dark"] .pet-local-card,
  [data-theme="dark"] .pet-profile-card,
  [data-bs-theme="dark"] .pet-matcher-card,
  [data-bs-theme="dark"] .pet-safety-card,
  [data-bs-theme="dark"] .pet-local-card,
  [data-bs-theme="dark"] .pet-profile-card {
    background: color-mix(in srgb, var(--card-bg, #1e1a17) 90%, var(--primary-color, #c4784a) 10%);
  }
}
