/* 41-team-hub-preview-and-editor.css
   Team Hub: phone preview, product colours and the editor layout.
   Files in css/ load in filename order and the cascade depends on it: see docs/CSS.md. */

/* iOS Safari chrome inside the Team Hub preview. The hardware component owns the
   status bar; page content begins beneath its safe-area rather than behind it. */
.team-phone-frame .team-public-preview {
  padding-top: 31px;
  padding-bottom: 84px;
  background: #18191d;
}
.team-phone-frame .team-public-preview header {
  padding-top: 17px;
}
.team-phone-safari {
  padding: 6px 9px 14px;
  background: rgba(37, 39, 45, 0.96);
  border-top: 1px solid #ffffff18;
  backdrop-filter: blur(18px) saturate(130%);
}
.team-safari-address {
  height: 29px;
  grid-template-columns: 32px minmax(0, 1fr) 30px;
  border-radius: 10px;
  background: #5b5e66;
  color: #fff;
  font-size: 9.2px;
  letter-spacing: -0.012em;
  box-shadow:
    inset 0 1px #ffffff20,
    0 1px 2px #0003;
}
.team-safari-address .team-safari-page-menu {
  padding: 0;
  text-align: center;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: -0.08em;
}
.team-safari-address > strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.team-safari-address > strong i {
  display: block;
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d8dbe0;
}
.team-safari-address .team-safari-reload {
  position: relative;
  height: 22px;
}
.team-safari-address .team-safari-reload:before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  width: 8px;
  height: 8px;
  border: 1.35px solid #f4f6fa;
  border-left-color: transparent;
  border-radius: 50%;
}
.team-safari-address .team-safari-reload:after {
  content: "";
  position: absolute;
  left: 8px;
  top: 5px;
  border-left: 3px solid #f4f6fa;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  rotate: -38deg;
}
.team-safari-tools {
  height: 28px;
  padding: 4px 6px 0;
  color: #55aaff;
}
.team-safari-tools span {
  position: relative;
  display: block;
  width: 26px;
  height: 22px;
  box-sizing: border-box;
}
.team-safari-back:before,
.team-safari-forward:before {
  content: "";
  position: absolute;
  top: 6px;
  width: 8px;
  height: 8px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}
.team-safari-back:before {
  left: 9px;
  rotate: 45deg;
}
.team-safari-forward:before {
  left: 6px;
  rotate: 225deg;
}
.team-safari-forward {
  opacity: 0.3;
}
.team-safari-share:before {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border: 1.4px solid currentColor;
  border-radius: 2px;
}
.team-safari-share:after {
  content: "\2191";
  position: absolute;
  left: 8px;
  top: -7px;
  font:
    500 19px/1 Arial,
    sans-serif;
}
.team-safari-bookmarks:before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 14px;
  height: 14px;
  border: 1.4px solid currentColor;
  border-radius: 2px 5px 4px 2px;
  transform: skewY(-4deg);
}
.team-safari-bookmarks:after {
  content: "";
  position: absolute;
  left: 12px;
  top: 5px;
  height: 13px;
  border-left: 1px solid currentColor;
}
.team-safari-tabs:before,
.team-safari-tabs:after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border: 1.4px solid currentColor;
  border-radius: 2px;
}
.team-safari-tabs:before {
  left: 5px;
  top: 4px;
}
.team-safari-tabs:after {
  left: 9px;
  top: 7px;
  background: #25272d;
}
.team-phone-safari + .team-phone-home {
  bottom: 4px;
}

/* Team Hub product-color accents: neutral foundations with small, repeatable cues. */
.team-hub-app {
  --hub-blue: #86c8e8;
  --hub-pink: #e9a4b8;
  --hub-green: #8fc89c;
  --hub-purple: #aa95d5;
  --hub-yellow: #f2cf62;
  --hub-orange: #eaa05d;
  --hub-gray: #a9afb8;
  --hub-tan: #c8ad86;
}
.team-hub-tabs button {
  border-radius: 8px 8px 0 0;
  transition:
    color 0.16s,
    background-color 0.16s,
    border-color 0.16s;
}
.team-hub-tabs button[data-team-tab="builder"].active {
  color: var(--hub-blue);
  border-color: var(--hub-blue);
  background: color-mix(in srgb, var(--hub-blue) 8%, transparent);
}
.team-hub-tabs button[data-team-tab="forms"].active {
  color: var(--hub-pink);
  border-color: var(--hub-pink);
  background: color-mix(in srgb, var(--hub-pink) 8%, transparent);
}
.team-hub-tabs button[data-team-tab="submissions"].active {
  color: var(--hub-green);
  border-color: var(--hub-green);
  background: color-mix(in srgb, var(--hub-green) 8%, transparent);
}
.team-hub-tabs button[data-team-tab="settings"].active {
  color: var(--hub-purple);
  border-color: var(--hub-purple);
  background: color-mix(in srgb, var(--hub-purple) 8%, transparent);
}
.team-builder-section {
  border-left: 3px solid var(--hub-blue);
}
.team-builder-section:nth-child(4n + 2) {
  border-left-color: var(--hub-pink);
}
.team-builder-section:nth-child(4n + 3) {
  border-left-color: var(--hub-green);
}
.team-builder-section:nth-child(4n + 4) {
  border-left-color: var(--hub-purple);
}
.team-builder-section .team-drag-handle {
  color: color-mix(in srgb, var(--hub-blue) 78%, var(--muted));
}
.team-section-add-item:hover {
  border-color: var(--hub-blue);
  color: var(--hub-blue);
  background: color-mix(in srgb, var(--hub-blue) 6%, transparent);
}
.team-hub-app .team-primary {
  background: linear-gradient(135deg, var(--hub-yellow), var(--hub-orange));
  color: #181818;
}
.team-native-form-card > span {
  background: var(--hub-pink);
}
.team-hub-corner-actions button[data-team-save]:not(:disabled) {
  border-color: color-mix(in srgb, var(--hub-blue) 55%, var(--border));
  color: var(--hub-blue);
}
.team-hub-corner-actions button[data-team-publish] {
  background: var(--hub-yellow);
  border-color: var(--hub-yellow);
}
.team-hub-corner-actions .team-tools-button {
  border-color: color-mix(in srgb, var(--hub-purple) 38%, var(--border));
}
.team-hub-tabs button:hover:not(.active) {
  color: var(--text);
  background: color-mix(in srgb, var(--hub-gray) 6%, transparent);
}
.team-builder-section.dragging,
.team-builder-item.dragging {
  opacity: 0.34;
  transform: scale(0.985);
  box-shadow: 0 10px 28px #0005;
}
.team-builder-section:not(.dragging),
.team-builder-item:not(.dragging) {
  transition:
    transform 0.14s ease,
    opacity 0.14s ease,
    box-shadow 0.14s ease;
}
.team-builder-section .team-builder-item {
  display: block;
  padding: 0;
  overflow: hidden;
}
.team-builder-item-summary {
  display: grid;
  grid-template-columns: 20px 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px;
}
.team-builder-item.editing {
  opacity: 1;
  border-color: color-mix(in srgb, var(--hub-blue) 55%, var(--border));
  background: var(--panel-2);
}
.team-builder-item.editing > .team-builder-item-summary {
  border-bottom: 1px solid var(--border);
}
.team-builder-actions button[data-team-edit],
.team-builder-actions button[data-team-visibility] {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
}
.team-builder-actions button[data-team-edit] {
  display: none;
}
.team-builder-item-summary {
  cursor: pointer;
  transition:
    background-color 0.15s,
    box-shadow 0.15s;
}
.team-builder-item-summary:hover,
.team-builder-item-summary:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--hub-blue) 8%, transparent);
  box-shadow: inset 3px 0 var(--hub-blue);
}
.team-builder-item.editing > .team-builder-item-summary {
  background: color-mix(in srgb, var(--hub-blue) 7%, transparent);
  box-shadow: inset 3px 0 var(--hub-blue);
}
.team-builder-item-summary .team-drag-handle {
  cursor: grab;
}
.team-builder-section > header input {
  width: max-content;
  max-width: 100%;
  padding: 5px 27px 5px 3px;
  border: 1px solid transparent !important;
  border-radius: 6px;
  font-size: 17px !important;
  line-height: 1.2;
  cursor: pointer;
  background-repeat: no-repeat !important;
  background-position: right 7px center !important;
  background-size: 13px !important;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}
.team-builder-section > header input[readonly]:hover {
  border-color: color-mix(in srgb, var(--hub-blue) 28%, transparent) !important;
  background-color: color-mix(in srgb, var(--hub-blue) 7%, transparent) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386c8e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L20 8l-4-4L4 16v4Zm10.5-13.5 4 4'/%3E%3C/svg%3E") !important;
}
.team-builder-section > header input.editing {
  cursor: text;
  border-color: var(--hub-blue) !important;
  background-color: var(--panel) !important;
  background-image: none !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hub-blue) 15%, transparent);
}
.team-builder-section > header input[readonly]::selection {
  background: transparent;
  color: inherit;
}
.team-editor-grid label:has(select[name="section"]) {
  display: none;
}
.team-type-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.team-type-choices button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--input-bg, var(--panel));
  color: var(--muted);
  font: 750 11px inherit;
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s,
    background-color 0.15s;
}
.team-type-choices button:first-child.active {
  color: #173342;
  border-color: var(--hub-blue);
  background: var(--hub-blue);
}
.team-type-choices button:last-child.active {
  color: #321d29;
  border-color: var(--hub-pink);
  background: var(--hub-pink);
}
.team-inline-editor label:has(select[name="type"]) {
  display: none;
}
.team-section-add-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.team-section-add-choices button {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 750 12px inherit;
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s,
    background-color 0.15s;
}
.team-section-add-choices button:first-child:hover {
  color: var(--hub-blue);
  border-color: var(--hub-blue);
  background: color-mix(in srgb, var(--hub-blue) 7%, transparent);
}
.team-section-add-choices button:last-child:hover {
  color: var(--hub-pink);
  border-color: var(--hub-pink);
  background: color-mix(in srgb, var(--hub-pink) 7%, transparent);
}
@media (max-width: 520px) {
  .team-section-add-choices {
    grid-template-columns: 1fr;
  }
}
.team-public-preview header {
  background: linear-gradient(135deg, var(--team-banner, #f2b544), color-mix(in srgb, var(--team-banner, #f2b544) 68%, #ee7d3e));
}
.team-item-kind i,
.team-item-kind svg,
.team-preview-link b i,
.team-preview-link b svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
}
.team-icon-field {
  grid-column: 1;
  grid-row: 1;
}
.team-icon-search {
  display: grid;
  gap: 5px;
}
.team-icon-search input[type="color"] {
  width: 34px;
  padding: 3px;
  cursor: pointer;
}
.team-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
}
.team-icon-grid button {
  display: grid;
  place-items: center;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.team-icon-grid button:hover,
.team-icon-grid button.selected {
  color: var(--hub-blue);
  border-color: var(--hub-blue);
  background: color-mix(in srgb, var(--hub-blue) 9%, transparent);
}
.team-icon-grid svg {
  width: 16px;
  height: 16px;
}
.team-icon-search {
  grid-template-columns: 1fr 34px;
  align-items: center;
}
.team-color-picker {
  position: relative;
  display: inline-grid;
  justify-self: start;
}
.team-color-trigger {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
}
.team-color-trigger span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--selected-color);
  box-shadow: 0 0 0 1px #ffffff44;
}
.team-color-palette {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(6, 20px);
  gap: 7px;
  width: max-content;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 14px 35px #0008;
}
.team-color-palette.hidden {
  display: none;
}
.team-color-palette button {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-radius: 50%;
  padding: 0;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: 0 0 0 1px #ffffff22;
}
.team-color-palette button:hover,
.team-color-palette button.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--swatch);
}
.team-icon-grid {
  max-height: none;
  overflow: visible;
}
.team-icon-grid button:nth-child(n + 25) {
  display: none;
}
.team-editor-grid.grouped {
  grid-template-columns: minmax(170px, 0.72fr) minmax(280px, 1.28fr);
  gap: 12px;
}
.team-editor-column {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
}
.team-editor-grid.grouped .team-editor-column > label {
  grid-column: auto;
  grid-row: auto;
}
.team-editor-grid.grouped .team-editor-column-right label[data-url],
.team-editor-grid.grouped .team-editor-column-right label[data-form] {
  grid-column: auto;
  grid-row: auto;
}
@media (max-width: 720px) {
  .team-editor-grid.grouped {
    grid-template-columns: 1fr;
  }
  .team-editor-column {
    gap: 8px;
  }
}
@media (min-width: 900px) and (max-width: 1180px) {
  .team-editor-grid.grouped {
    grid-template-columns: 1fr;
  }
}
.team-editor-column-right label:has(input[name="title"]) {
  order: 1;
}
.team-editor-column-right label[data-url],
.team-editor-column-right label[data-form] {
  order: 2;
}
.team-editor-column-right label:has(textarea[name="description"]) {
  order: 3;
}
.team-editor-column-right textarea[name="description"] {
  min-height: 54px;
  max-height: 112px;
  resize: none;
}
.team-builder-actions button[data-team-edit] svg,
.team-builder-actions button[data-team-visibility] svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.team-builder-actions button[data-team-visibility] {
  color: var(--hub-green);
  border-color: color-mix(in srgb, var(--hub-green) 35%, var(--border));
}
.team-builder-actions button[data-team-visibility].is-hidden {
  color: var(--hub-gray);
  border-color: var(--border);
}
.team-builder-actions .team-delete-item {
  min-width: 31px;
  height: 31px;
  padding: 0 8px !important;
  color: #ef6b72 !important;
  border-color: color-mix(in srgb, #ef6b72 45%, var(--border)) !important;
  font-size: 18px;
  line-height: 1;
}
.team-builder-actions .team-delete-item.confirming {
  font-size: 10px;
  font-weight: 850;
  background: #a72f38 !important;
  color: #fff !important;
  border-color: #d9515b !important;
}
.team-inline-editor {
  background: color-mix(in srgb, var(--panel-2) 88%, var(--hub-blue));
}
.team-inline-editor footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.team-inline-editor footer button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: 750 13px inherit;
  cursor: pointer;
}
.team-inline-editor footer .team-primary {
  border: 0;
  color: #181818;
}
@media (max-width: 720px) {
  .team-builder-item-summary {
    grid-template-columns: 18px 34px minmax(0, 1fr);
  }
  .team-builder-item-summary .team-builder-actions {
    grid-column: 1/-1;
    justify-content: flex-end;
  }
}

/* Compact Team Hub add/edit forms. */
.team-editor-grid {
  gap: 9px 12px;
}
.team-editor-grid label {
  gap: 4px;
}
.team-editor-grid label > span {
  font-size: 9.5px;
  line-height: 1.15;
}
.team-editor-grid input,
.team-editor-grid textarea,
.team-editor-grid select {
  padding: 7px 9px;
  min-height: 34px;
  font-size: 13px;
}
.team-editor-grid textarea {
  line-height: 1.3;
  resize: vertical;
}
.team-inline-editor {
  padding: 10px 12px;
}
.team-inline-add {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--hub-blue) 55%, var(--border));
  border-left: 3px solid var(--hub-blue);
  border-radius: 10px;
  background: var(--panel-2);
  box-shadow: 0 8px 22px #0002;
}
.team-inline-add:before {
  content: "New link";
  display: block;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--hub-blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.team-inline-editor footer {
  margin-top: 9px;
}
.team-inline-editor footer button {
  padding: 7px 11px;
}
.team-editor-modal > header {
  padding: 13px 16px;
}
.team-editor-modal form {
  padding: 14px 16px;
}
.team-editor-modal footer {
  margin-top: 13px;
}
.team-editor-modal footer button {
  padding: 8px 12px;
}
@media (max-width: 720px) {
  .team-inline-editor {
    padding: 9px;
  }
  .team-editor-grid {
    gap: 8px;
  }
  .team-editor-modal form {
    padding: 12px;
  }
}

/* Team Hub editor: selections left, written content right. */
.team-editor-grid {
  grid-template-columns: minmax(170px, 0.72fr) minmax(280px, 1.28fr);
  align-items: start;
}
.team-editor-grid label:has(select[name="type"]) {
  grid-column: 1;
  grid-row: 1;
}
.team-editor-grid label:has(select[name="section"]) {
  grid-column: 1;
  grid-row: 2;
}
.team-editor-grid label:has(select[name="access"]) {
  grid-column: 1;
  grid-row: 3;
}
.team-editor-grid .team-visible-toggle {
  grid-column: 1;
  grid-row: 4;
  align-self: center;
  min-height: 34px;
}
.team-editor-grid label:has(input[name="title"]) {
  grid-column: 2;
  grid-row: 1;
}
.team-editor-grid label:has(textarea[name="description"]) {
  grid-column: 2;
  grid-row: 2;
}
.team-editor-grid label[data-url],
.team-editor-grid label[data-form] {
  grid-column: 2;
  grid-row: 3;
}
.team-inline-editor > footer,
.team-editor-modal form > footer {
  margin-left: calc(36% + 6px);
  justify-content: flex-end;
}
.team-editor-modal .team-visible-toggle {
  display: none !important;
}
@media (max-width: 720px) {
  .team-editor-grid {
    grid-template-columns: 1fr;
  }
  .team-editor-grid label:has(select[name="type"]),
  .team-editor-grid label:has(select[name="section"]),
  .team-editor-grid label:has(select[name="access"]),
  .team-editor-grid .team-visible-toggle,
  .team-editor-grid label:has(input[name="title"]),
  .team-editor-grid label:has(textarea[name="description"]),
  .team-editor-grid label[data-url],
  .team-editor-grid label[data-form] {
    grid-column: 1;
    grid-row: auto;
  }
  .team-inline-editor > footer,
  .team-editor-modal form > footer {
    margin-left: 0;
  }
}
