/*
  SHEDyt's control centre, in the Super Admin file's layout (978:167228): bands of three panels (a list, an edit area and
  an information panel), each with a coloured head, a light grey bar under it and a white body; the information panels
  are grey. Clients are the file's purple, their people its amber, and the wording the property list's slate blue.
  Nothing here has a green design yet, so it's redone to the pixel when it does.
*/

.cc {
  --cc-client: var(--colour-violet-500);
  --cc-user: #b58151;
  --cc-wording: var(--colour-slate-blue-500);
  --cc-bar: #f6f6f6;
  --cc-information: #d8d8d8;
  --cc-line: #e4e4e4;
  --cc-expander: #a4a4ac;
  --cc-danger: #c0392b;
  min-height: 100vh;
  padding: 0 24px 48px;
  background: #fff;
  color: #333;
  font-size: 13px;
}

.cc-top {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 0;
}

.cc-top__logo {
  display: block;
  line-height: 0;
}

.cc-top__title {
  flex: 1;
  margin: 0;
  color: var(--cc-client);
  font-size: 20px;
  font-weight: 600;
}

.cc-top__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cc-top__links a,
.cc-top__link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cc-client);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.cc-top__links a:hover,
.cc-top__link-button:hover {
  text-decoration: underline;
}

/* Kept in view, as a change made lower down comes back scrolled to its band */
.cc-message {
  position: sticky;
  top: 8px;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
}

.cc-message .message {
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
}

.cc-band {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) minmax(220px, 1fr);
  max-width: 1400px;
  margin: 0 auto 24px;
  border-bottom: 10px solid var(--cc-expander);
  border-radius: 6px 6px 4px 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.12);
}

.cc-band--client {
  --cc-colour: var(--cc-client);
}

.cc-band--user {
  --cc-colour: var(--cc-user);
}

.cc-band--wording {
  --cc-colour: var(--cc-wording);
}

.cc-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--cc-line);
}

.cc-panel:first-child {
  border-left: 0;
}

.cc-panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 16px;
  background: var(--cc-colour);
  color: #fff;
}

.cc-panel--information .cc-panel__head {
  background: color-mix(in srgb, var(--cc-colour) 45%, #fff);
  color: color-mix(in srgb, var(--cc-colour) 70%, #000);
}

.cc-panel__head h2 {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.cc-head-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.cc-head-button:hover {
  background: rgb(255 255 255 / 0.2);
}

.cc-panel__bar {
  padding: 8px 12px;
  border-bottom: 1px solid var(--cc-line);
  background: var(--cc-bar);
}

.cc-panel__bar input {
  width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--cc-line);
  border-radius: 4px;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.cc-panel__body {
  flex: 1;
  padding: 16px;
}

.cc-panel--information .cc-panel__body {
  background: var(--cc-information);
}

.cc-list {
  flex: 1;
  max-height: 340px;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  list-style: none;
}

.cc-list__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  color: inherit;
  text-decoration: none;
}

.cc-list__item:hover {
  background: var(--cc-bar);
}

.cc-list__item--chosen {
  background: color-mix(in srgb, var(--cc-colour) 14%, #fff);
  font-weight: 600;
}

.cc-list__item--chosen:hover {
  background: color-mix(in srgb, var(--cc-colour) 20%, #fff);
}

.cc-list__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-list__empty,
.cc-empty {
  margin: 0;
  padding: 6px 16px;
  color: #777;
}

.cc-empty {
  padding: 0;
}

.cc-tag {
  flex: none;
  padding: 1px 8px;
  border-radius: 10px;
  background: #ececec;
  color: #555;
  font-size: 11px;
  font-weight: 600;
}

.cc-tag--pending {
  background: #fff1d6;
  color: #8a5a00;
}

.cc-tag--suspended {
  background: #e8e8ee;
  color: #4b4b57;
}

.cc-tag--deleted {
  background: #fbe3e0;
  color: var(--cc-danger);
}

.cc-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 560px;
}

.cc-form + .cc-form {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--cc-line);
}

.cc-subhead {
  margin: 0;
  color: var(--cc-colour);
  font-size: 14px;
  font-weight: 600;
}

.cc-label {
  margin-top: 6px;
  font-weight: 600;
}

.cc-optional {
  color: #888;
  font-weight: 400;
}

.cc-field {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.cc-field:focus {
  border-color: var(--cc-colour);
  outline: 2px solid color-mix(in srgb, var(--cc-colour) 30%, transparent);
}

.cc-field--long {
  min-height: 240px;
  resize: vertical;
  line-height: 1.5;
}

.cc-fieldset {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin: 10px 0 0;
  padding: 8px 12px 12px;
  border: 1px solid var(--cc-line);
  border-radius: 4px;
}

.cc-fieldset legend {
  padding: 0 4px;
  font-weight: 600;
}

.cc-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.cc-pair > span {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cc-note {
  margin: 0;
  color: #555;
  line-height: 1.5;
}

.cc-panel--information .cc-note + .cc-note {
  margin-top: 8px;
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.cc-button {
  margin-top: 8px;
  padding: 7px 18px;
  border: 0;
  border-radius: 4px;
  background: var(--cc-colour);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cc-actions .cc-button {
  margin-top: 0;
}

.cc-button:hover {
  filter: brightness(0.92);
}

.cc-button--quiet {
  border: 1px solid var(--cc-colour);
  background: #fff;
  color: var(--cc-colour);
}

.cc-button--danger {
  background: var(--cc-danger);
}

.cc-confirm {
  margin-top: 10px;
}

.cc-confirm summary {
  color: var(--cc-danger);
  font-weight: 600;
  cursor: pointer;
}

.cc-confirm p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.cc-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin: 0;
}

.cc-facts dt {
  color: #555;
  text-align: right;
}

.cc-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.cc-logo,
.cc-picture {
  display: block;
  max-width: 100%;
  max-height: 80px;
  margin-bottom: 12px;
  object-fit: contain;
}

.cc-picture {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.cc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .cc {
    padding: 0 16px 32px;
  }

  .cc-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-panel {
    border-left: 0;
    border-top: 1px solid var(--cc-line);
  }

  .cc-top {
    flex-wrap: wrap;
    gap: 12px;
  }
}
