/*
 * Standalone caregiver-video player styling. Deliberately mirrors the look of the 
 * PARA app CaregiverVideosModal
 */

:root {
  --primary: #044BAE;
  --on-primary: #ffffff;
  --row-border: #eeeeee;
  --muted: #666666;
  --detail-muted: #555555;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #f2f4f7;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.page-header {
  background: var(--primary);
  color: var(--on-primary);
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

.page-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.offline-status {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.9;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

/* ---- Empty / info states ---- */
.info-text {
  font-size: 15px;
  color: var(--muted);
  padding: 24px 8px;
  text-align: center;
}

/* ---- List view ---- */
.video-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.video-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 6px;
  border-bottom: 1px solid var(--row-border);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.video-row:active { background: #f7f9fc; }

.play-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
}

.row-text { flex: 1 1 auto; min-width: 0; }

.row-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.row-description {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}

.row-unavailable {
  display: block;
  font-size: 12px;
  color: #b00020;
  margin-top: 5px;
}

/* ---- Detail / player view ---- */
.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #000;
  display: block;
}

.video-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
}

.unavailable-icon { width: 44px; height: 44px; }

.detail-title {
  font-size: 18px;
  font-weight: 700;
  margin: 14px 0 0;
}

.detail-description {
  font-size: 14px;
  color: var(--detail-muted);
  margin: 6px 0 0;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 15px;
  cursor: pointer;
}

.back-icon { width: 18px; height: 18px; }
