/*
 * D-22 Training · Created by me (the Director's Site training): the two-tab strip
 * "Assigned to me N · Created by me N" and the rows Training · Assigned to · Due · Completed
 * ("5 of 8" over a bar) · Status · "…".
 */
@layer pages {
  /* The two-tab strip is the portal training list's (training_strip; components/train-tabs.css). */

  .tcms-created { --list-cols: minmax(0, 1.8fr) minmax(0, 1.3fr) 120px 200px 120px 40px; }

  .tcms-created__title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .tcms-created__icon {
    width: 36px;
    height: 36px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--petal-ops-bg);
    color: var(--petal-ops-fg);
    font-size: 17px;
  }
  .tcms-created__link { color: var(--color-text); font-weight: 700; }
  .tcms-created__link:hover { color: var(--color-text); text-decoration: underline; }
  .list-row--archived .tcms-created__link { color: inherit; }

  .tcms-created__done {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
  }
  .tcms-created__count { font-size: 12.5px; font-weight: 700; }

  /* 8px bar: blue while people are still working on it, sage once everyone is done. */
  .tcms-bar {
    display: block;
    width: 100%;
    height: 8px;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--color-neutral-300);
    appearance: none;
    color: var(--color-blue);
  }
  .tcms-bar::-webkit-progress-bar { background: var(--color-neutral-300); }
  .tcms-bar::-webkit-progress-value { background: var(--color-blue); }
  .tcms-bar::-moz-progress-bar { background: var(--color-blue); }
  .tcms-bar--done { color: var(--color-accent-2-600); }
  .tcms-bar--done::-webkit-progress-value { background: var(--color-accent-2-600); }
  .tcms-bar--done::-moz-progress-bar { background: var(--color-accent-2-600); }

  /* "…": 34px at the start of the 40px column, the icon at the row's 13.5px. */
  .tcms-created__row .list-row__end { position: relative; z-index: 1; justify-content: flex-start; }
  .tcms-created__row .list-row__end:has(.menu__panel:not([hidden])) { z-index: 5; }
  .tcms-created__more {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--color-text);
    font-size: 13.5px;
  }
  .tcms-created__more:hover,
  .tcms-created__more[aria-expanded="true"] { background: var(--color-bg); }

  @media (max-width: 1199px) {
    .tcms-created { --list-cols: minmax(0, 1.8fr) minmax(0, 1.2fr) 84px 150px 96px 40px; }
  }

  @media (max-width: 1023px) {
    .tcms-created { --list-cols: minmax(0, 1.6fr) minmax(0, 1fr) 70px 120px 90px 40px; }
    .tcms-created :is(.list-header, .list-row) { column-gap: 10px; }
  }

  @media (max-width: 767px) {
    /* Compact card: title + status, who and when, then the bar; "…" at the top right. */
    .tcms-created { --list-cols-mobile: minmax(0, 1fr) auto auto; }
    .tcms-created__row > .tcms-created__title { grid-area: 1 / 1; }
    .tcms-created__row > :nth-child(5) { grid-area: 1 / 2; justify-self: end; align-self: center; }
    .tcms-created__row > .list-row__end { grid-area: 1 / 3; }
    .tcms-created__row > .tcms-created__to { grid-area: 2 / 1 / 3 / 3; }
    .tcms-created__row > .tcms-created__due { grid-area: 2 / 3; justify-self: end; color: var(--color-neutral-700); }
    .tcms-created__row > .tcms-created__done { grid-area: 3 / 1 / 4 / 4; }
    .tcms-created__more { width: 44px; height: 44px; margin: -5px -8px -5px 0; }
  }
}
