main.apply-next-profile-mode > :not(#applyNextPanel) {
  display: none !important;
}

main.apply-next-profile-mode #applyNextPanel {
  margin-top: 0;
}

.apply-next-profile-wizard {
  display: grid;
  gap: 1rem;
}

.apply-next-profile-section {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem;
  border: 1px solid var(--line, #d9dde5);
  border-radius: 12px;
  background: var(--panel, #fff);
}

.apply-next-profile-section h3,
.apply-next-profile-section p {
  margin: 0;
}

.apply-next-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.apply-next-profile-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.apply-next-profile-field input,
.apply-next-profile-field select,
.apply-next-profile-field textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
}

.apply-next-profile-field textarea {
  resize: vertical;
}

.apply-next-profile-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
}

.apply-next-profile-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.apply-next-profile-check input[type="checkbox"],
.apply-next-profile-check input[type="radio"] {
  width: auto;
  flex: 0 0 auto;
}

.apply-next-profile-subhead {
  font-weight: 700;
  font-size: 0.82rem;
}

.apply-next-profile-role-groups {
  display: grid;
  gap: 0.7rem;
}

.apply-next-profile-role-group {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem;
  border: 1px solid var(--line, #d9dde5);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel, #fff) 92%, var(--line, #d9dde5));
}

.apply-next-profile-status {
  min-height: 1.2rem;
}

.apply-next-location-intro,
.apply-next-location-panel {
  display: grid;
  gap: 0.7rem;
}

.apply-next-location-basic-grid {
  grid-template-columns: minmax(9rem, 12rem) minmax(11rem, 14rem);
  justify-content: start;
  align-items: start;
}

.apply-next-location-basic-grid .apply-next-profile-field input {
  min-width: 0;
}

.apply-next-location-mode-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  width: min(100%, 360px);
  padding: 0.25rem;
  border: 1px solid var(--line, #d9dde5);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel, #fff) 82%, var(--line, #d9dde5));
}

.apply-next-location-mode-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.apply-next-location-mode-button[aria-pressed="true"] {
  background: var(--panel, #fff);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.apply-next-location-panel {
  padding: 0.9rem;
  border: 1px solid var(--line, #d9dde5);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel, #fff) 94%, #f5f7fb);
}

.apply-next-location-panel[hidden] {
  display: none;
}

.apply-next-location-summary-chip {
  width: fit-content;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #315efb) 12%, transparent);
  color: var(--accent, #315efb);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.apply-next-location-panel-heading {
  display: grid;
  gap: 0.45rem;
}

.apply-next-location-anchor-list {
  display: grid;
  gap: 0.65rem;
}

.apply-next-location-anchor-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.15fr) minmax(110px, 0.9fr) minmax(90px, 0.7fr) auto;
  gap: 0.65rem;
  align-items: end;
  padding: 0.75rem;
  border: 1px solid var(--line, #d9dde5);
  border-radius: 12px;
  background: var(--panel, #fff);
}

.apply-next-location-remove {
  align-self: center;
  margin-top: 1.1rem;
}

.apply-next-location-add {
  width: fit-content;
}

.apply-next-location-score-grid {
  margin-top: 0.2rem;
}

.apply-next-location-field-hint {
  color: var(--muted, #6b7280);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.35;
}

.apply-next-location-hard-limit {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel, #fff) 70%, #eef2f7);
  font-size: 0.86rem;
  font-weight: 650;
}

.apply-next-location-hard-limit input {
  margin-top: 0.12rem;
}

.apply-next-location-regions {
  border-top: 1px solid var(--line, #d9dde5);
  padding-top: 0.8rem;
}

.apply-next-location-regions summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
}

.apply-next-location-regions[open] summary {
  margin-bottom: 0.6rem;
}

.apply-next-location-region-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.apply-next-location-region-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title input"
    "states input";
  gap: 0.16rem 0.7rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid var(--line, #d9dde5);
  border-radius: 11px;
  background: var(--panel, #fff);
}

.apply-next-location-region-title {
  grid-area: title;
  font-size: 0.86rem;
  font-weight: 750;
}

.apply-next-location-region-states {
  grid-area: states;
  color: var(--muted, #6b7280);
  font-size: 0.72rem;
  line-height: 1.35;
}

.apply-next-location-region-card input {
  grid-area: input;
  width: 76px;
  box-sizing: border-box;
  font: inherit;
}

@media (max-width: 720px) {
  .apply-next-profile-grid,
  .apply-next-location-region-grid,
  .apply-next-location-basic-grid {
    grid-template-columns: 1fr;
  }

  .apply-next-location-anchor-row {
    grid-template-columns: 1fr 1fr;
  }

  .apply-next-location-remove {
    margin-top: 0;
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .apply-next-location-anchor-row {
    grid-template-columns: 1fr;
  }

  .apply-next-location-mode-toggle {
    width: 100%;
  }
}


.apply-next-intent-section {
  border-color: color-mix(in srgb, var(--accent, #315efb) 28%, var(--line, #d9dde5));
  background: color-mix(in srgb, var(--panel, #fff) 94%, var(--accent, #315efb));
}

.apply-next-intent-confirmation {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
  border: 1px solid var(--line, #d9dde5);
  border-radius: 10px;
  background: var(--panel, #fff);
}

.apply-next-intent-confirmation.hidden {
  display: none;
}

.apply-next-intent-confirmation h4 {
  margin: 0;
}

.apply-next-intent-summary {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
}


.apply-next-quick-questions {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.15rem;
}

.apply-next-quick-question {
  display: grid;
  gap: 0.4rem;
}

.apply-next-quick-label {
  font-size: 0.84rem;
  font-weight: 750;
}

.apply-next-quick-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.apply-next-quick-choice {
  appearance: none;
  border: 1px solid var(--line, #d9dde5);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  background: var(--panel, #fff);
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.apply-next-quick-choice[aria-pressed="true"] {
  border-color: var(--accent, #315efb);
  background: color-mix(in srgb, var(--accent, #315efb) 12%, var(--panel, #fff));
  color: var(--accent, #315efb);
}

.apply-next-profile-advanced {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line, #d9dde5);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel, #fff) 96%, var(--line, #d9dde5));
}

.apply-next-profile-advanced-summary {
  cursor: pointer;
  font-weight: 800;
}

.apply-next-profile-advanced-body {
  display: grid;
  gap: 1rem;
}

.apply-next-profile-advanced:not([open]) > .apply-next-profile-advanced-body,
.apply-next-profile-advanced:not([open]) > p {
  display: none;
}


.apply-next-intent-section {
  padding: 1.15rem;
}

.apply-next-intent-section textarea[name="naturalIntent"] {
  min-height: 8rem;
  font-size: 1rem;
  line-height: 1.5;
}

.apply-next-intent-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.apply-next-intent-starter-label {
  width: 100%;
  color: var(--muted, #6b7280);
  font-size: 0.8rem;
  font-weight: 700;
}

.apply-next-intent-starter {
  appearance: none;
  border: 1px solid var(--line, #d9dde5);
  border-radius: 999px;
  padding: 0.42rem 0.68rem;
  background: var(--panel, #fff);
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.apply-next-intent-starter:hover,
.apply-next-intent-starter:focus-visible {
  border-color: var(--accent, #315efb);
}

.apply-next-intent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
}

.apply-next-quick-setup-link {
  font-weight: 750;
}
