/* Own activities, free stretches of the evening, and the form that adds them */

/* ---------- the plus next to the After classes heading ---------- */

.clubs-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.add-activity {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sm-line);
  border-radius: 50%;
  color: var(--sm-blue);
  background: rgba(255, 255, 255, .86);
  box-shadow: inset 0 1px 0 #fff, 0 8px 18px rgba(36, 68, 113, .07);
  cursor: pointer;
}
.add-activity .lucide { width: 21px; height: 21px; }

/* ---------- a free stretch of the evening ---------- */

.free-slot {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px dashed rgba(101, 126, 164, .32);
  border-radius: 17px;
  color: var(--sm-muted);
  background: rgba(255, 255, 255, .42);
  cursor: pointer;
}

.free-copy { display: flex; align-items: baseline; gap: 9px; text-align: left; }
.free-copy strong { font-size: 14px; font-weight: 650; color: var(--sm-ink); }
.free-copy span { font-size: 12.5px; }

.free-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--sm-blue);
}
.free-add .lucide { width: 16px; height: 16px; }

.free-entry .timeline-dot { opacity: .45; }

/* ---------- an activity the pupil added ---------- */

.club-card.own-activity {
  border-style: solid;
  border-color: rgba(91, 107, 134, .22);
  background: rgba(255, 255, 255, .92);
}
.club-card.own-activity .club-end { color: var(--sm-muted); }
.club-card.own-activity .club-end .lucide { width: 17px; height: 17px; }

/* ---------- the add and edit form ---------- */

.activity-form { display: grid; gap: 13px; min-width: min(340px, 82vw); }
.activity-form h2 { margin: 0 0 2px; font-size: 18px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 650; color: var(--sm-muted); }
.field input[type="text"],
.field input[type="time"] {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--sm-line);
  border-radius: 13px;
  color: var(--sm-ink);
  background: #fff;
  font: inherit;
  font-size: 15px;
}
.field input:focus-visible { outline: 2px solid var(--sm-blue); outline-offset: 1px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.field-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--sm-ink);
  cursor: pointer;
}
.field-check input { width: 20px; height: 20px; accent-color: var(--sm-blue); }

.activity-form .dialog-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 3px; }
.activity-form .action-btn { min-height: 42px; padding: 0 15px; }
.action-btn.primary { color: #fff; border-color: transparent; background: var(--sm-blue); }
.action-btn.danger { color: #c0392f; border-color: rgba(192, 57, 47, .22); background: rgba(255, 241, 240, .9); }
.activity-form .action-btn.danger { margin-right: auto; }

.app-dialog {
  border: 0;
  border-radius: 24px;
  padding: 20px;
  color: var(--sm-ink);
  background: var(--sm-page);
  box-shadow: 0 30px 80px rgba(20, 45, 80, .28);
}
.app-dialog::backdrop { background: rgba(13, 29, 52, .34); backdrop-filter: blur(3px); }

/* ---------- reminders ---------- */

.menu-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  margin: 12px 0 0;
  padding: 0 12px;
  border: 1px solid var(--sm-line);
  border-radius: 14px;
  color: var(--sm-ink);
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.menu-link > span { display: inline-flex; align-items: center; gap: 9px; }
.menu-link .lucide { width: 18px; height: 18px; color: var(--sm-blue); }
.menu-link > .lucide { color: var(--sm-muted); }

.reminders-form { display: grid; gap: 11px; min-width: min(340px, 82vw); }
.reminders-form h2 { margin: 0; font-size: 18px; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--sm-line);
  border-radius: 13px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}
.switch-row.primary { font-weight: 700; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--sm-blue); }

.switch-list { display: grid; gap: 7px; }
.switch-list.is-off { opacity: .45; pointer-events: none; }

.field-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-inline > span { font-size: 14px; font-weight: 650; color: var(--sm-ink); }
.field-inline input { width: 128px; }
.field-inline input:disabled { opacity: .45; }

.dialog-note { margin: 2px 0 0; color: var(--sm-muted); font-size: 12.5px; line-height: 1.45; }

/* The own-activity card is not one button: the name opens the editor and the
   star marks attendance, so each needs its own hit area. */
.club-card.own-activity { grid-template-columns: 52px minmax(0, 1fr) auto; cursor: default; }

.own-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.own-main .club-end {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(101, 126, 164, .1);
}

.club-card.own-activity.is-muted .own-main .club-end { display: none; }
.club-card.own-activity .club-star { cursor: pointer; border: 0; background: none; padding: 0; }

/* ---------- notes and materials ---------- */

.notes-form { display: grid; gap: 12px; min-width: min(340px, 82vw); }
.notes-form h2 { margin: 0; font-size: 18px; }
.notes-subject { margin: -6px 0 0; color: var(--sm-muted); font-size: 13px; font-weight: 650; }

.notes-form textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--sm-line);
  border-radius: 13px;
  color: var(--sm-ink);
  background: #fff;
  font: inherit;
  font-size: 14.5px;
  line-height: 1.45;
  resize: vertical;
}
.notes-form textarea:focus-visible,
.notes-form input:focus-visible { outline: 2px solid var(--sm-blue); outline-offset: 1px; }
.notes-form input:disabled { opacity: .6; }

.class-links { display: grid; gap: 7px; }
.class-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--sm-line);
  border-radius: 12px;
  color: var(--sm-blue);
  background: #fff;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.class-link .lucide { width: 16px; height: 16px; }

/* ---------- photos on a note ---------- */

.photo-strip { display: flex; flex-wrap: wrap; gap: 9px; }

.photo-thumb {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 13px;
  overflow: hidden;
  background: rgba(101, 126, 164, .1);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(11, 29, 58, .62);
  cursor: pointer;
}
.photo-remove .lucide { width: 13px; height: 13px; }

.photo-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: start;
  min-height: 40px;
  padding: 0 14px;
  border: 1px dashed rgba(101, 126, 164, .38);
  border-radius: 13px;
  color: var(--sm-blue);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.photo-add .lucide { width: 17px; height: 17px; }

.photo-dialog {
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  padding: 0;
  border: 0;
  background: rgba(8, 18, 34, .94);
}
.photo-dialog::backdrop { background: rgba(8, 18, 34, .8); }
.photo-dialog img { width: 100%; height: 100%; object-fit: contain; }

.photo-close {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  cursor: pointer;
}
