/* Basic, framework-agnostic styles for the static activity template */

:root[data-theme="dark"] {
  --bg: #25282a;
  --card: #32383c;
  --text: #ffffff;
  --muted: #a1a1aa;
  --accent: #78aa00;
  --border: #2a2b31;
}

:root[data-theme="light"] {
  --bg: #eeeeee;
  --card: #ffffff;
  --text: #25282a;
  --muted: #5a5a60;
  --accent: #78aa00;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji,
    Segoe UI Emoji;
}

.vmfit-header {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vmfit-header__inner {
  width: 100%;
  height: 100%;
  max-width: 1140px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.vmfit-header__logo {
  height: 100%;
  width: 96px;
}
.vmfit-header__actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
}
.vmfit-header__button {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.vmfit-footer {
  max-width: 1140px;
  display: flex;
  padding-top: 16px;
  padding-bottom: 23px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.vmfit-footer h2 {
  margin: 0 0 0 0;
  padding-bottom: 23px;
  font-size: 26px;
}
.vmfit-footer p {
  text-align: center;
  padding-left: 16px;
  padding-right: 16px;
}
.vmfit-footer__inner {
  width: 100%;
  height: 100%;
  max-width: 1140px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

/* Theme toggle icons visibility */
html[data-theme="light"] .theme-icon--sun {
  display: inline;
}
html[data-theme="light"] .theme-icon--moon {
  display: none;
}
html[data-theme="dark"] .theme-icon--sun {
  display: none;
}
html[data-theme="dark"] .theme-icon--moon {
  display: inline;
}

.vmfit-activity {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0px 16px;
}

/* Activity grid container (matches ActivityView) */
.activity-container {
  width: 100%;
  display: grid;
  grid-auto-rows: auto;
  gap: 32px;
  padding: 32px 0;
  grid-auto-flow: dense;
  border-radius: 0;
}
@media (min-width: 1024px) {
  .activity-container {
    gap: 16px;
    padding: 16px 24px;
  }
}
.activity-container {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 1024px) {
  .activity-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* @media (min-width: 1024px) { */
  .activity-container {
    border-radius: 12px;
  }
/* } */

/* Generic Block wrapper (matches Block.js) */
.block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  width: 100%;
  background: var(--card);
  border-radius: 0;
}
/* @media (min-width: 1024px) { */
  .block {
    border-radius: 12px;
  }
/* } */
.block--full {
  grid-column: span 2;
}
@media (min-width: 1024px) {
  .block--full {
    grid-column: span 4;
  }
}
@media (min-width: 1024px) {
  .block--full {
    grid-column: span 4;
  }
}
.block--half {
  grid-column: span 2;
}
.block-third {
  grid-column: span 3;
}

.activity__title {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border);
}
@media (min-width: 1024px) {
  .activity-header {
    grid-template-columns: 1fr 420px;
    align-items: center;
  }
}

/* Title Card (matches requested Tailwind-like design) */
.activity-title-card {
  width: 100%;
  background: var(--card);
  border-radius: 12px;
  box-shadow: none;
}
@media (min-width: 768px) {
  .activity-title-card,
  .block.block--half,
  .block.block--full {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  }
}
.activity-title-card__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  color: var(--text);
}
.activity-title-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgb(188, 86, 121);
  flex-shrink: 0;
}
.activity-title-card__text {
  display: flex;
  flex-direction: column;
}
.activity-title-card__title {
  margin: 0;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
}
.activity-title-card__datetime {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--text);
}

/* Activity Summary grid */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  width: 100%;
  height: 100%;
  justify-content: center;
}
@media (min-width: 1024px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.summary-item {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}
.summary-item__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.summary-item__icon img,
.summary-item__icon svg {
  width: 24px;
  height: 24px;
  display: block;
}
.summary-item__name {
  margin: 0;
  font-weight: 300;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--text);
}
.summary-item__value {
  margin: 0;
  font-weight: 400;
}

.user {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
}
.user__avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--border);
}
.user__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.activity__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}
.user__sport {
  margin: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}
.activity__datetime {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.activity-preview {
  width: 100%;
  height: 220px;
  background: #121316;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.activity-preview__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Legacy properties grid (no longer used; kept for reference) */
.activity-properties {
  display: none;
}

.activity-notes {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.activity-notes h2 {
  margin: 0 0 8px 0;
  font-size: 16px;
}
.activity-notes p {
  margin: 0;
  color: var(--text);
}

.activity-media {
}
.activity-media h2 {
  font-size: 16px;
  margin: 0 0 8px 0;
}
/* Match ActivitiMedia horizontal scroller */
.media-strip {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: scroll;
  gap: 16px;
  text-align: center;
  padding: 16px;
}
.media-strip img {
  display: block;
  height: auto;
  border-radius: 12px;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.media-lightbox.open {
  display: flex;
}
.media-lightbox img {
  max-height: 70%;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.activity-track {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  height: 100%;
  width: 100%;
}
.activity-track .maplibregl-canvas,
.activity-track .maplibregl-map {
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  min-height: 400px;
}
.charts {
  width: 100%;
  height: 260px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.chart {
  width: 100%;
  height: 100%;
  display: block;
  box-sizing: border-box;
  overflow: hidden;
}
.chart h2 {
  margin: 8px 0 8px 0;
  font-size: 16px;
}
.activity-track h2 {
  margin: 0 0 8px 0;
  font-size: 16px;
}
.track-image {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.track-meta {
  display: none;
}

.activity-footer {
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
