/* Campaign creation */
.gms-draft-form {
  --draft-accent:var(--ext-accent,var(--agency-accent,var(--gms-primary)));
  --draft-line:var(--ext-line,var(--agency-line,#d5dbe5));
  --draft-muted:var(--ext-muted,var(--agency-muted,#536078));
  --draft-tint:color-mix(in srgb,var(--draft-accent) 5%,white);
  gap:20px; container-type:inline-size;
}
.gms-draft-form svg {width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linejoin:round; stroke-linecap:round}
.gms-draft-form fieldset {margin:0; padding:0; min-width:0; border:0}
.gms-draft-form legend,.gms-draft-selection h4 {margin:0; padding:0 0 8px; color:inherit; font-family:inherit; font-size:14px; font-weight:650; line-height:1.4}
.gms-goal-options {display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px}
.gms-goal-options label {
  position:relative; display:grid; justify-items:start; align-content:start; gap:9px; padding:13px;
  background:white; border:1px solid var(--draft-line); border-radius:10px; cursor:pointer;
  color:inherit; font-size:14px; font-weight:600; line-height:1.35;
}
.gms-goal-options label:hover {border-color:var(--draft-accent)}
.gms-goal-options label:has(input:checked) {background:var(--draft-tint); border-color:var(--draft-accent); box-shadow:inset 0 0 0 1px var(--draft-accent)}
.gms-goal-options label:has(:focus-visible) {outline:2px solid var(--draft-accent); outline-offset:2px}
.gms-draft-form .gms-goal-options input {
  appearance:none; position:absolute; inset:12px 12px auto auto; width:14px; height:14px; min-width:0; min-height:0;
  margin:0; padding:0; border:1px solid #aab4c4; border-radius:50%; background:white; box-shadow:none; cursor:pointer;
}
.gms-draft-form .gms-goal-options input:checked {border:4px solid var(--draft-accent)}
.gms-draft-form .gms-goal-options input::before {content:none}
.gms-draft-form .gms-goal-options input:focus-visible {outline:0}
.gms-goal-options svg {color:var(--draft-muted)}
.gms-goal-options label:has(:checked) svg {color:var(--draft-accent)}
.gms-game-frame {border:1px solid var(--draft-line); background:white; border-radius:12px}
.gms-game-line,.gms-draft-game-preview,.gms-game-toolbar {display:flex; align-items:center; gap:16px}
.gms-game-line {justify-content:space-between; padding:14px}
.gms-draft-game-preview {min-width:0}
.gms-draft-game-preview img,.gms-game-option img {display:block; flex:none; object-fit:cover; border-radius:7px; background:#f5f6f8}
.gms-draft-game-preview img {width:112px; height:68px}
.gms-draft-game-preview strong {font-size:17px; line-height:1.3}
.gms-draft-game-preview p,.gms-draft-selection .gms-draft-game-help,.gms-draft-guide p {margin:4px 0 0; color:var(--draft-muted); font-size:13px; line-height:1.5}
.gms-draft-selection .gms-draft-game-help {margin-top:7px}
.gms-draft-form .gms-game-change {
  display:inline-flex; align-items:center; justify-content:center; flex:none; gap:6px; min-height:38px; padding:7px 12px;
  background:var(--draft-tint); color:var(--draft-accent); border:1px solid var(--draft-line); border-radius:8px; font:inherit; font-size:14px; font-weight:650; cursor:pointer;
}
.gms-draft-form .gms-game-change:hover {border-color:var(--draft-accent)}
.gms-game-change svg {width:16px; height:16px}
.gms-game-change[aria-expanded=true] svg {transform:rotate(180deg)}
.gms-game-browser {border-top:1px solid var(--draft-line); padding:14px}
.gms-game-toolbar {margin-bottom:10px; gap:12px}
.gms-game-toolbar label {position:relative; flex:1; min-width:0}
.gms-game-toolbar svg {position:absolute; top:50%; left:12px; transform:translateY(-50%); width:17px; height:17px; color:var(--draft-muted); pointer-events:none}
.gms-game-toolbar input[type=search] {box-sizing:border-box; width:100%; max-width:none; min-height:40px; margin:0; padding:7px 12px 7px 38px; background:white; border:1px solid var(--draft-line); border-radius:8px; color:inherit; font-size:14px}
.gms-game-count {color:var(--draft-muted); font-size:13px; white-space:nowrap}
.gms-block .gms-draft-form :is(button,input:not([type=radio])):focus-visible {outline:2px solid var(--draft-accent); outline-offset:2px; box-shadow:none}
.gms-game-options {display:grid; grid-template-columns:repeat(auto-fill,minmax(min(188px,100%),1fr)); gap:7px; max-height:260px; overflow-y:auto; padding:3px; scroll-padding:3px}
.gms-draft-form .gms-game-option {
  display:flex; align-items:center; gap:10px; min-width:0; padding:6px; background:white;
  color:inherit; border:1px solid var(--draft-line); border-radius:8px; font:inherit; font-size:14px; font-weight:600; text-align:start; cursor:pointer;
}
.gms-draft-form .gms-game-option:is(:hover,[aria-pressed=true]) {background:var(--draft-tint); border-color:var(--draft-accent)}
.gms-game-option[aria-pressed=true] {box-shadow:inset 0 0 0 1px var(--draft-accent)}
.gms-game-option img {width:62px; height:40px; border-radius:5px}
.gms-game-options>p {grid-column:1/-1; margin:10px 0; font-size:14px}
.gms-draft-links {display:grid; grid-template-columns:repeat(auto-fit,minmax(min(225px,100%),1fr)); gap:12px}
.gms-draft-guide {border-inline-start:3px solid var(--draft-line); padding-inline-start:12px}
.gms-draft-guide p:first-child {margin:0; color:inherit}
.gms-draft-form>[aria-live]:empty {display:none}
.gms-draft-form>button:disabled {opacity:.55; cursor:default}
@container(max-width:780px) {
  .gms-goal-options {grid-template-columns:repeat(auto-fit,minmax(min(135px,100%),1fr))}
}
@container(max-width:480px) {
  .gms-goal-options {grid-template-columns:repeat(2,minmax(0,1fr))}
  .gms-goal-options label {padding:10px; gap:6px}
  .gms-game-line {align-items:flex-start; flex-direction:column; gap:10px}
  .gms-draft-game-preview {gap:10px}
  .gms-draft-game-preview img {width:80px; height:52px}
  .gms-draft-form .gms-game-change {min-height:44px; align-self:stretch}
}

/* Campaign builder and preview controls. */
.gms-builder {
  max-width: 1440px;
  margin: auto;
}
.gms-builder-heading {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1rem 0;
}
.gms-builder-heading h2 {
  font-size: 1.5rem;
  margin: 0.25rem 0;
}
.gms-save-status {
  font-size: 0.8rem;
  color: #48616a;
}
.gms-builder-steps {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem;
  background: #edf7f8;
  border-radius: 16px;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}
.gms-step {
  border: 0;
  border-radius: 11px;
  padding: 0.8rem 1rem;
  white-space: nowrap;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  color: #365462;
}
.gms-step[aria-current='step'] {
  background: #fff;
  color: #0a5466;
  box-shadow: 0 2px 6px #2b164312;
  font-weight: 700;
}
.gms-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  gap: 2rem;
  align-items: start;
}
.gms-builder-fields {
  min-width: 0;
}
.gms-builder-fields h3 {
  font-size: 1.2rem;
}
.gms-builder-fields > .gms-field {
  margin-bottom: 1rem;
}
.gms-builder-preview {
  position: sticky;
  top: 24px;
  min-width: 0;
  border: 1px solid #e0eef0;
  border-radius: 24px;
  background: #f4fafb;
  padding: 1.25rem;
}
.gms-preview-screen {
  width: 100%;
  max-width: 100%;
  margin: auto;
  transition: width 0.2s;
  box-shadow: 0 10px 45px #3b215212;
  border-radius: 20px;
  overflow: hidden;
}
.gms-preview-frame { display:block; max-width:none; border:0; transform-origin:top left; }
.gms-preview-screen.is-mobile {
  width: 360px;
}
.gms-builder-next {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid #e0eef0;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}
.gms-builder-mobile-switch {
  display: none;
}
@media (max-width: 900px) {
  .gms-builder-layout {
    grid-template-columns: 1fr;
  }
  .gms-builder-preview {
    position: static;
    display: none;
  }
  .gms-builder-mobile-switch {
    display: flex;
    gap: 0.5rem;
    margin: 0 0 1rem;
  }
  .gms-builder-layout.show-preview .gms-builder-preview {
    display: block;
  }
  .gms-builder-layout.show-preview .gms-builder-fields {
    display: none;
  }
  .gms-builder-heading {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .gms-builder-heading > div {
    order: 3;
    width: 100%;
  }
  .gms-preview-screen.is-mobile {
    max-width: 100%;
  }
}
@media (max-width: 480px) {
  .gms-builder-preview {
    padding: 0.5rem;
  }
  .gms-builder-next {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gms-preview-screen {
    transition: none;
  }
}

.gms-item-chooser {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.gms-item-choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid #dbe8ea;
  background: #fff;
  border-radius: 11px;
  padding: 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  text-align: left;
  color: #335564;
  cursor: pointer;
  min-width: 0;
}
.gms-item-choice > span:not(.gms-item-swatch) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gms-item-choice small {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.gms-item-choice[aria-pressed='true'] {
  border-color: #318599;
  background: #eff9fa;
  box-shadow: 0 0 0 1px #318599;
}
.gms-item-swatch {
  flex: 0 0 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid #00000010;
}
@media (max-width: 400px) {
  .gms-item-chooser {
    grid-template-columns: 1fr;
  }
}

/* Owner and agency controls for managing campaigns and upgrading a workspace. */
.gms-block .gms-campaign-actions {gap:8px;align-items:center}
.gms-block .gms-action-chip {
  --chip-bg:#edf6f8;--chip-ink:#224e61;--chip-line:#c6dce3;
  display:inline-flex;align-items:center;justify-content:center;gap:.45em;min-height:36px;
  padding:7px 12px;border-radius:9px;border:1px solid var(--chip-line);background:var(--chip-bg);
  color:var(--chip-ink);font-family:inherit;font-size:14px;font-weight:650;line-height:1.3;
  box-shadow:none;text-decoration:none;
}
.gms-block .gms-action-chip svg {width:1.08em;height:1.08em;flex:none;fill:none;stroke:currentColor;stroke-width:1.85;stroke-linejoin:round;stroke-linecap:round}
.gms-block .gms-action-chip::after {content:none}
.gms-block .gms-action-chip:hover {filter:brightness(.96);text-decoration:none}
.gms-block .gms-tone-primary {--chip-bg:#244bbe;--chip-ink:white;--chip-line:#244bbe}
.gms-block .gms-tone-teal {--chip-bg:#dff7f1;--chip-ink:#095f56;--chip-line:#a7dbce}
.gms-block .gms-tone-feature {--chip-bg:#e1f2ff;--chip-ink:#194b8b;--chip-line:#b1cfed}
.gms-block .gms-tone-warning {--chip-bg:#fff1bd;--chip-ink:#724600;--chip-line:#eacb78}
.gms-block .gms-tone-danger {--chip-bg:#ffebea;--chip-ink:#912d31;--chip-line:#edb9b8}
.gms-block .gms-tone-muted {--chip-bg:#eef1f4;--chip-ink:#455666;--chip-line:#cfd9e0}
.gms-block .gms-tone-upgrade {background:linear-gradient(115deg,#1348b9,#00697d);color:#fff;border-color:transparent;padding:12px 20px;min-height:46px;border-radius:12px;font-size:16px;box-shadow:0 4px 12px #07526924}
.gms-listing-controls {margin-top:16px;border-top:1px solid #cbdfe5;padding:14px 0 0}
.gms-listing-controls h4 {margin:0 0 10px}
.gms-block .gms-listing-controls form {display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px}
.gms-listing-controls .gms-form>[aria-live]:empty {display:none}
.gms-block .gms-hosting-offer {background:linear-gradient(112deg,#edfbfb,#f9fdfd);border-color:#b7dfdf}
.gms-confirm-dialog {box-sizing:border-box;width:min(440px,calc(100% - 32px));padding:24px;border:1px solid #bcd7df;border-radius:18px;color:#19374b;background:#fff;box-shadow:0 20px 70px #142e4433}
.gms-confirm-dialog::backdrop {background:#10293b85}
.gms-confirm-dialog h2 {margin:0;color:#16344a}
.gms-confirm-dialog > header {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-12px -12px 0 0}
.gms-confirm-dialog p {line-height:1.55}
.gms-confirm-dialog .gms-actions {justify-content:flex-end;margin-top:18px;align-items:stretch}
.gms-confirm-dialog .gms-dialog-cancel {background:#edf6f8;color:#204356}
@media(max-width:600px){.gms-block .gms-action-chip{min-height:44px}}
.gms-block :is(.gms-campaign-filters,.gms-listing-controls) button[type="submit"] {display:inline-flex;align-items:center;justify-content:center;gap:.45em}
.gms-campaign-filters button[type="submit"]::before,.gms-listing-controls button[type="submit"]::before {
  content:"";width:1.05em;height:1.05em;flex:none;background:currentColor;mask:var(--gms-control-icon) center/contain no-repeat;
}
.gms-campaign-filters {--gms-control-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h18M6 12h12m-9 6h6'/%3E%3C/svg%3E")}
.gms-listing-controls {--gms-control-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 12 5 5L20 6'/%3E%3C/svg%3E")}

.gms-block .gms-campaign-filters {
  display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;
  align-items:end;gap:12px;margin:1.5rem 0;
}
.gms-campaign-filters > .gms-field {margin:0}
.gms-campaign-filters > button[type="submit"] {grid-column:3;grid-row:1;min-height:46px}
.gms-campaign-filters > [aria-live] {grid-column:1/-1;grid-row:2}
.gms-campaign-filters > [aria-live]:empty {display:none}
.gms-block .gms-listing-controls :is(.gms-checkbox label,button[type="submit"]) {font-size:14px}
.gms-block .gms-listing-controls button[type="submit"] {min-height:34px;padding:6px 12px;line-height:1.3;border-radius:8px}
@media(max-width:600px) {
  .gms-block .gms-campaign-filters {gap:8px;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}
  .gms-block .gms-campaign-filters button[type="submit"] {min-width:44px;padding:0 10px;font-size:14px}
  .gms-campaign-filters .gms-filter-detail {display:none}
}

.gms-builder-fields .gms-extended-game-setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.gms-extended-game-setup > h3 {
  margin: 0;
}
.gms-extended-game-setup :is(fieldset, label, .gms-item-editor, .gms-game-image-picker) {
  min-width: 0;
}
.gms-game-image-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.gms-game-image-picker > label:has(input[type="file"]) {
  display: grid;
  gap: 6px;
  font-weight: 600;
}
.gms-game-image-picker input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 4px;
  border: 1px solid #b6cdd2;
  border-radius: 9px;
  background: #fff;
  color: #354b57;
  font: inherit;
}
.gms-game-image-picker input::file-selector-button {
  padding: 7px 12px;
  margin-inline-end: 10px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: #e4f4f6;
  color: #12586a;
  font: inherit;
  cursor: pointer;
}
.gms-game-image-picker > [role="status"]:empty { display: none; }
.gms-extended-game-setup details > summary {
  display: list-item;
  padding: 12px;
  background: #e9f5f6;
  color: #174e5c;
  border-radius: 8px;
  font-weight: 650;
  cursor: pointer;
}
.gms-extended-game-setup details[open] > .gms-game-image-picker { margin-top: 16px; }
