.surface {
  --configuration-ink: #171c25;
  --configuration-muted: #677184;
  --configuration-line: #d9dde4;
  --configuration-line-strong: #b9c0cb;
  --configuration-focus: #3458f5;
}

.surface :global(.fotogenic-ai-configuration-tool-layer) {
  position: absolute;
  z-index: 22;
  inset: 0;
  inset-block-start: var(--fa-studio-workspace-visible-top, 0px);
  max-block-size: var(--fa-studio-workspace-visible-height, 100%);
}

.surface :global(.fotogenic-ai-configuration-tool-layer .fotogenic-ai-configuration-drawer) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 43%;
  min-width: 400px;
  border-left: 1px solid var(--configuration-line);
  font-family: var(--fa-font-sans);
  font-size: 16px;
  line-height: normal;
}

.surface :global(.fotogenic-ai-configuration-tool-layer .fotogenic-ai-configuration-drawer__header) {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 0;
  padding: 17px 18px 14px;
  border-bottom: 1px solid var(--configuration-line);
}

.surface :global(.fotogenic-ai-configuration-tool-layer .fotogenic-ai-configuration-drawer__header > div) {
  display: block;
  flex: 1 1 auto;
  grid-column: auto;
  min-width: 0;
}

.surface :global(.fotogenic-ai-configuration-tool-layer .fotogenic-ai-configuration-drawer__header h2) {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 19px;
}

.surface :global(.fotogenic-ai-configuration-tool-layer .fotogenic-ai-configuration-drawer__header p) {
  margin: 3px 0 0;
  color: var(--configuration-muted);
  font-size: 10px;
  line-height: 15px;
}

.surface :global(.fotogenic-ai-configuration-tool-layer .fotogenic-ai-configuration-drawer__close) {
  display: grid;
  flex: 0 0 44px;
  grid-column: auto;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  place-items: center;
  color: #657184;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.surface :global(.fotogenic-ai-configuration-tool-layer .fotogenic-ai-configuration-drawer__close:hover) {
  color: #293342;
  background: #f2f4f7;
}

.surface :global(.fotogenic-ai-configuration-tool-layer .fotogenic-ai-configuration-drawer__body) {
  min-height: 0;
  padding: 16px 18px;
  overflow-y: auto;
}

.surface :global(.fotogenic-ai-preset-save-current) {
  width: 100%;
  min-height: 38px;
  margin: 0 0 12px;
  padding: 0;
  color: #3e5f99;
  background: #fff;
  border: 1px dashed #aeb8c7;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 750;
  line-height: normal;
  cursor: pointer;
}

.surface :global(.fotogenic-ai-primary-small),
.surface :global(.fotogenic-ai-secondary-small) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: normal;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.surface :global(.fotogenic-ai-primary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  color: #fff;
  background: #171b23;
  border: 1px solid #171b23;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: normal;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.surface :global(.fotogenic-ai-primary:hover:not(:disabled)),
.surface :global(.fotogenic-ai-primary:active:not(:disabled)) {
  color: #fff;
  background: #303642;
  border-color: #303642;
}

.surface :global(.fotogenic-ai-primary:disabled) {
  color: #9298a1;
  background: #e6e8eb;
  border-color: #e6e8eb;
  cursor: not-allowed;
  opacity: 1;
}

.surface :global(.fotogenic-ai-primary-small) {
  color: #fff;
  background: #171b23;
  border: 1px solid #171b23;
}

.surface :global(.fotogenic-ai-primary-small:hover:not(:disabled)),
.surface :global(.fotogenic-ai-primary-small:active:not(:disabled)) {
  color: #fff;
  background: #303642;
  border-color: #303642;
}

.surface :global(.fotogenic-ai-primary-small:disabled) {
  color: #9298a1;
  background: #e6e8eb;
  border-color: #e6e8eb;
  cursor: not-allowed;
  opacity: 1;
}

.surface :global(.fotogenic-ai-secondary-small) {
  color: #26303d;
  background: #fff;
  border: 1px solid var(--configuration-line-strong);
}

.surface :global(.fotogenic-ai-secondary-small:hover:not(:disabled)),
.surface :global(.fotogenic-ai-secondary-small:active:not(:disabled)) {
  color: #26303d;
  background: #f5f6f8;
  border-color: #858e9b;
}

.surface :global(.fotogenic-ai-preset-editor) {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #cbd3df;
  border-radius: 7px;
}

.surface :global(.fotogenic-ai-preset-editor label) {
  display: grid;
  gap: 5px;
  color: #4a5668;
  font-size: 10px;
  font-weight: 750;
}

.surface :global(.fotogenic-ai-preset-editor input) {
  width: 100%;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0 10px;
  color: var(--configuration-ink);
  background: #fff;
  border: 1px solid var(--configuration-line-strong);
  border-radius: 6px;
  box-shadow: none;
  font-size: 11px;
  line-height: normal;
}

.surface :global(.fotogenic-ai-preset-editor input:focus-visible) {
  border-color: var(--configuration-line-strong);
  outline: 2px solid var(--configuration-focus);
  outline-offset: 2px;
  box-shadow: none;
}

.surface :global(.fotogenic-ai-preset-save-current:focus-visible),
.surface :global(.fotogenic-ai-primary:focus-visible),
.surface :global(.fotogenic-ai-primary-small:focus-visible),
.surface :global(.fotogenic-ai-secondary-small:focus-visible),
.surface :global(.fotogenic-ai-preset-utility-button:focus-visible),
.surface :global(.fotogenic-ai-danger-button:focus-visible) {
  outline: 2px solid var(--configuration-focus);
  outline-offset: 2px;
  box-shadow: none;
}

.surface :global(.fotogenic-ai-preset-editor > div) {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.surface :global(.fotogenic-ai-preset-notice) {
  margin: 0 0 10px;
  padding: 8px 10px;
  color: #236b43;
  background: #f1faf5;
  border: 1px solid #c6e0d1;
  border-radius: 6px;
  font-size: 10px;
  line-height: 15px;
}

.surface :global(.fotogenic-ai-preset-notice.is-error) {
  color: #9f2631;
  background: #fff7f7;
  border-color: #ecc9cd;
}

.surface :global(.fotogenic-ai-preset-list) {
  display: grid;
  gap: 9px;
}

.surface :global(.fotogenic-ai-preset-notice.is-pending) {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.surface :global(.fotogenic-ai-preset-card) {
  display: grid;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--configuration-line);
  border-radius: 8px;
}

.surface :global(.fotogenic-ai-preset-card__header) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 13px;
}

.surface :global(.fotogenic-ai-preset-card__copy) {
  min-width: 0;
}

.surface :global(.fotogenic-ai-preset-card__copy strong) {
  display: block;
  overflow: hidden;
  font-size: 11px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surface :global(.fotogenic-ai-preset-card__copy p),
.surface :global(.fotogenic-ai-preset-empty p) {
  margin: 3px 0 0;
  color: var(--configuration-muted);
  font-size: 9px;
  line-height: 14px;
}

.surface :global(.fotogenic-ai-preset-apply) {
  min-width: 72px;
}

.surface :global(.fotogenic-ai-preset-card__meta) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  background: #f8f9fb;
  border-top: 1px solid var(--configuration-line);
}

.surface :global(.fotogenic-ai-preset-compatible) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin: 0;
  color: #247248;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
}

.surface :global(.fotogenic-ai-preset-compatible > .fotogenic-ai-icon) {
  flex: 0 0 auto;
}

.surface :global(.fotogenic-ai-preset-card__utilities) {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}

.surface :global(.fotogenic-ai-preset-utility-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  margin: 0;
  padding: 0 7px;
  color: #4b586c;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 750;
  line-height: normal;
  cursor: pointer;
}

.surface :global(.fotogenic-ai-preset-utility-button:hover:not(:disabled)) {
  color: #263142;
  background: #eef1f5;
}

.surface :global(.fotogenic-ai-preset-utility-button.is-danger) {
  color: #943b36;
}

.surface :global(.fotogenic-ai-preset-utility-button.is-danger:hover:not(:disabled)) {
  color: #812c27;
  background: #fff6f5;
}

.surface :global(.fotogenic-ai-preset-utility-button:disabled) {
  cursor: not-allowed;
  opacity: .52;
}

.surface :global(.fotogenic-ai-danger-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
  color: #943b36;
  background: #fff;
  border: 1px solid #d9b8b5;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 750;
  line-height: normal;
  cursor: pointer;
  appearance: none;
}

.surface :global(.fotogenic-ai-danger-button:hover) {
  color: #7f2925;
  background: #fff6f5;
  border-color: #c58d88;
}

.surface :global(.fotogenic-ai-preset-empty) {
  padding: 35px 15px;
  border: 1px dashed var(--configuration-line);
  border-radius: 7px;
  text-align: center;
}

.surface :global(.fotogenic-ai-preset-delete-confirmation) {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  color: #753630;
  background: #fff7f6;
  border: 1px solid #e4bbb6;
  border-radius: 7px;
}

.surface :global(.fotogenic-ai-preset-delete-confirmation > div) {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.surface :global(.fotogenic-ai-preset-delete-confirmation span) {
  display: grid;
  gap: 2px;
}

.surface :global(.fotogenic-ai-preset-delete-confirmation strong) {
  font-size: 11px;
}

.surface :global(.fotogenic-ai-preset-delete-confirmation small) {
  color: #81544f;
  font-size: 9px;
  line-height: 14px;
}

.surface :global(.fotogenic-ai-preset-delete-confirmation footer) {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.surface :global(.fotogenic-ai-automatic-configuration-panel) {
  display: grid;
  justify-items: center;
  padding: 24px 8px;
  text-align: center;
}

.surface :global(.fotogenic-ai-automatic-configuration-panel.is-ready) {
  justify-items: stretch;
  padding: 6px 0 0;
  text-align: start;
}

.surface :global(.fotogenic-ai-automatic-configuration-icon) {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #315fc6;
  background: #edf3ff;
  border-radius: 50%;
}

.surface :global(.fotogenic-ai-automatic-configuration-panel h3) {
  margin: 13px 0 6px;
  color: var(--configuration-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 19px;
}

.surface :global(.fotogenic-ai-automatic-configuration-panel > p) {
  max-width: 34ch;
  margin: 0 0 16px;
  color: var(--configuration-muted);
  font-size: 10px;
  line-height: 16px;
}

.surface :global(.fotogenic-ai-automatic-recommendation-heading) {
  display: flex;
  align-items: flex-start;
  justify-self: stretch;
  gap: 9px;
  color: #148343;
  text-align: start;
}

.surface :global(.fotogenic-ai-automatic-recommendation-heading div) {
  flex: 1 1 auto;
}

.surface :global(.fotogenic-ai-automatic-recommendation-heading p) {
  margin: 2px 0 0;
  color: var(--configuration-muted);
  font-size: 9px;
  line-height: normal;
}

.surface :global(.fotogenic-ai-automatic-recommendations) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  margin: 8px 0 10px;
  text-align: start;
}

.surface :global(.fotogenic-ai-automatic-recommendations div) {
  padding: 7px 9px;
  background: #f5f7fa;
  border-radius: 6px;
}

.surface :global(.fotogenic-ai-automatic-recommendations div.is-wide) {
  grid-column: 1 / -1;
}

.surface :global(.fotogenic-ai-automatic-recommendations dt) {
  color: var(--configuration-muted);
  font-size: 8px;
  line-height: 12px;
  text-transform: uppercase;
}

.surface :global(.fotogenic-ai-automatic-recommendations dd) {
  margin: 2px 0 0;
  font-size: 10px;
  font-weight: 750;
  line-height: 14px;
  overflow-wrap: anywhere;
}

.surface :global(.fotogenic-ai-automatic-configuration-actions) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.surface :global(.fotogenic-ai-automatic-configuration-actions .fotogenic-ai-secondary-small) {
  min-height: 44px;
}

@container fotogenic-studio (max-width: 420px) {
  .surface :global(.fotogenic-ai-automatic-configuration-actions) {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .surface :global(.fotogenic-ai-automatic-configuration-actions > button) {
    width: 100%;
  }
}

@container fotogenic-studio (max-width: 820px) {
  .surface :global(.fotogenic-ai-configuration-tool-layer) {
    position: fixed;
    z-index: 30;
    inset: 0;
    max-block-size: none;
  }

  .surface :global(.fotogenic-ai-configuration-tool-layer .fotogenic-ai-configuration-drawer) {
    width: 100%;
    min-width: 0;
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .surface :global(.fotogenic-ai-primary-small),
  .surface :global(.fotogenic-ai-primary),
  .surface :global(.fotogenic-ai-secondary-small) {
    transition-duration: .01ms;
  }
}
