/* The portal on a phone: More (/more), the note on a class opened on a phone, and the
   next class under today's students on My schedule. Views in src/components.js. */

.more-page {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: var(--fresco-space-4);
  font-family: var(--fresco-font);
  color: var(--fresco-ink);
}

.more-title {
  margin: 0;
  font-family: var(--fresco-display);
  font-size: var(--fresco-text-2xl);
  font-weight: 600;
}

.more-install {
  display: flex;
  align-items: center;
  gap: var(--fresco-space-3);
  padding: var(--fresco-space-3) var(--fresco-space-4);
  border: 1px solid #d9d1ff;
  border-radius: var(--fresco-radius-lg);
  background: var(--fresco-primary-soft);
  color: var(--fresco-ink);
  text-decoration: none;
}

.more-install img {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.more-install span {
  display: grid;
  flex: 1;
  gap: 2px;
}

.more-install strong {
  font-weight: 600;
}

.more-install small {
  color: #4a4f6a;
  font-size: var(--fresco-text-sm);
}

.more-install > .ui-icon {
  color: var(--fresco-primary);
}

.more-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--fresco-line);
  border-radius: var(--fresco-radius-lg);
  background: var(--fresco-surface);
}

.more-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 54px;
  padding: 0 var(--fresco-space-4);
  border: 0;
  border-bottom: 1px solid var(--fresco-line);
  background: transparent;
  color: var(--fresco-ink);
  font: inherit;
  font-size: var(--fresco-text-base);
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.more-link:last-child {
  border-bottom: 0;
}

.more-link[aria-current="page"] {
  background: var(--fresco-primary-soft);
}

.more-link .nav-icon {
  display: inline-flex;
  color: var(--fresco-muted);
}

.more-link .nav-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.more-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fresco-space-3);
  padding: var(--fresco-space-3) var(--fresco-space-4);
  border: 1px solid var(--fresco-line);
  border-radius: var(--fresco-radius-lg);
  background: var(--fresco-surface);
}

.more-profile > span {
  display: grid;
  min-width: 0;
}

.more-profile small {
  overflow: hidden;
  color: var(--fresco-muted);
  font-size: var(--fresco-text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.more-sign-out {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--fresco-line-strong);
  border-radius: var(--fresco-radius-sm);
  background: var(--fresco-surface);
  color: var(--fresco-ink);
  font: inherit;
  font-size: var(--fresco-text-sm);
  font-weight: 600;
  cursor: pointer;
}

.more-sign-out .ui-icon {
  width: 16px;
  height: 16px;
}

/* A class opened on a phone: one note above the class, never on a computer or tablet. */
.phone-class-note {
  display: none;
}

@media (max-width: 700px) {
  :root:not([data-phone-note-seen="true"]) .phone-class-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 14px;
    padding: 14px;
    border: 1px solid var(--fresco-teacher-line);
    border-radius: var(--fresco-radius);
    background: var(--fresco-teacher);
    color: var(--fresco-teacher-ink);
    font-family: var(--fresco-font);
    font-size: var(--fresco-text-sm);
    line-height: 1.45;
  }
}

.phone-class-note > .ui-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.phone-class-note strong {
  font-weight: 600;
}

.phone-class-note button {
  flex-shrink: 0;
  align-self: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--fresco-teacher-line);
  border-radius: var(--fresco-radius-sm);
  background: var(--fresco-surface);
  color: var(--fresco-teacher-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* My schedule, Day view: the student's next class under each of today's classes
   (src/todayClasses.js fills it in once known). */
.schedule-card-next {
  display: block;
  margin: -4px 14px 10px 86px;
  font-size: 0.8125rem;
  line-height: 1.35;
}

/* A card without a link is itself the grid (time | student): the line takes the student's column. */
.schedule-card:not(.has-join) > .schedule-card-next {
  grid-column: 2;
  margin: -8px 0 0;
}

.schedule-card-next[hidden] {
  display: none;
}

/* .schedule-card.has-join a lays the card's own link out as a grid: not this one. */
.schedule-card .schedule-card-next .today-classes-next,
.schedule-card .schedule-card-next .today-classes-last {
  display: inline;
  padding: 0;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
}

.schedule-card-next .today-classes-next {
  color: var(--fresco-primary);
  text-decoration: none;
}

.schedule-card-next .today-classes-next:hover {
  text-decoration: underline;
}

.schedule-card-next .today-classes-next b {
  font-weight: 600;
}

.schedule-card-next .today-classes-last {
  color: var(--fresco-muted);
}

/* With the line under it, Join stays centred on the class's own row. */
.schedule-card.has-join > a {
  position: relative;
}
