.mc-fs-wrap {
  --mc-fs-text: #02273e;
  --mc-fs-border: #8ca4ab;
  --mc-fs-border-strong: #02273e;
  --mc-fs-primary: #02273e;
  --mc-fs-primary-hover: #345264;
  --mc-fs-error: #b32d2e;

  max-width: 760px;
  margin: 0 auto 24px;
}

.mc-fs-form {
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--mc-fs-text);
}

.mc-fs-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--mc-fs-text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 12px;
  opacity: 0.6;
}

.mc-fs-field input,
.mc-fs-field textarea,
.mc-fs-field select {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--mc-fs-text);
  padding: 0;
  font-size: 16px;
  transition: color 120ms ease;
  box-sizing: border-box;
}

.mc-fs-input-shell {
  width: 100%;
  min-height: 48px;
  background: var(--mc-color-surface, #fff);
  border: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  clip-path: polygon(
    var(--mc-chamfer-lg) 0,
    100% 0,
    100% calc(100% - var(--mc-chamfer-lg)),
    calc(100% - var(--mc-chamfer-lg)) 100%,
    0 100%,
    0 var(--mc-chamfer-lg)
  );
  box-sizing: border-box;
  transition: box-shadow 120ms ease;
}

.mc-fs-input-shell:focus-within {
  box-shadow: 0 0 0 3px rgba(15, 58, 87, 0.16);
}

.mc-fs-input-shell--select {
  position: relative;
}

.mc-fs-input-shell--select::after {
  display: none;
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-30%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--mc-fs-text);
  pointer-events: none;
}

.mc-fs-input-shell--textarea {
  min-height: 112px;
  align-items: flex-start;
}

.mc-fs-field input::placeholder,
.mc-fs-field textarea::placeholder {
  color: #6f8790;
}

.mc-fs-field input:focus,
.mc-fs-field textarea:focus,
.mc-fs-field select:focus {
  outline: none;
  box-shadow: none;
}

/* Keep browser autofill from painting blue/yellow overlays inside form fields. */
.mc-fs-field input:-webkit-autofill,
.mc-fs-field input:-webkit-autofill:hover,
.mc-fs-field input:-webkit-autofill:focus,
.mc-fs-field textarea:-webkit-autofill,
.mc-fs-field textarea:-webkit-autofill:hover,
.mc-fs-field textarea:-webkit-autofill:focus,
.mc-fs-field select:-webkit-autofill,
.mc-fs-field select:-webkit-autofill:hover,
.mc-fs-field select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--mc-fs-text);
  caret-color: var(--mc-fs-text);
  -webkit-box-shadow: 0 0 0 1000px var(--mc-color-surface, #fff) inset;
  box-shadow: 0 0 0 1000px var(--mc-color-surface, #fff) inset;
  transition: background-color 9999s ease-out;
}

.mc-fs-field select {
  min-height: auto;
  padding: 0 1.25rem 0 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--mc-fs-text);
  font-weight: 400;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  outline: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-image: none;
}

.mc-fs-field select::-ms-expand {
  display: none;
}

.mc-fs-field select option {
  background: var(--mc-color-surface, #fff);
  color: var(--mc-color-black, #0c0308);
  font-weight: 500;
  padding: 10px 12px;
}

.mc-fs-field select option:checked {
  background: #e9eef0;
  color: var(--mc-color-black, #0c0308);
  font-weight: 600;
}

.mc-fs-field select option:not(:checked):hover {
  background: #f2f5f7;
  color: var(--mc-color-black, #0c0308);
}

/* Align picker behavior with product-list-sort native progressive enhancement. */
@supports (appearance: base-select) {
  .mc-fs-field select {
    appearance: base-select;
  }

  .mc-fs-field select::picker(select) {
    appearance: base-select;
    border: 1px solid #8ca4ab;
    background: var(--mc-color-surface, #fff);
    box-shadow: 0 12px 28px rgba(2, 39, 62, 0.16);
    padding: 6px;
  }

  .mc-fs-field select option {
    border-radius: 4px;
    margin: 2px 0;
  }

  .mc-fs-field select option::checkmark {
    display: none;
  }
}

.mc-fs-field textarea {
  min-height: 112px;
  height: 112px;
  resize: vertical;
}

.mc-fs-field small {
  display: block;
  margin-top: 6px;
  color: #3f5969;
  font-size: 12px;
}

.mc-fs-consent-field label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  opacity: 1;
  text-transform: none;
  letter-spacing: normal;
  font-size: 14px;
  font-weight: 400;
}

.mc-fs-consent-field input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--mc-fs-border);
  background: #fff;
  border-radius: 0;
  box-shadow: none;
}

.mc-fs-file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mc-fs-file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  transform-origin: top center;
  opacity: 0;
  transform: scaleY(0.9);
  transition: opacity 180ms ease;
}

.mc-fs-file-chips.is-visible {
  opacity: 1;
  transform: scaleY(1);
  animation: mc-fs-chips-reveal 220ms ease both;
}

@keyframes mc-fs-chips-reveal {
  from {
    opacity: 0;
    transform: scaleY(0.85);
  }

  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.mc-fs-file-chip {
  position: relative;
  width: 128px;
  min-height: 86px;
  padding: 10px 12px;
  background: #fff;
  color: var(--mc-fs-text);
  border: 1px solid rgba(2, 39, 62, 0.16);
  display: flex;
  align-items: flex-end;
  clip-path: polygon(
    var(--mc-chamfer-sm, 8px) 0,
    100% 0,
    100% calc(100% - var(--mc-chamfer-sm, 8px)),
    calc(100% - var(--mc-chamfer-sm, 8px)) 100%,
    0 100%,
    0 var(--mc-chamfer-sm, 8px)
  );
  box-sizing: border-box;
}

.mc-fs-file-chip__name {
  font-size: 12px;
  line-height: 1.25;
  max-height: calc(1.25em * 4);
  overflow: hidden;
  word-break: break-word;
}

.mc-fs-file-chip__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: rgba(2, 39, 62, 0.08);
  color: var(--mc-fs-text);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mc-fs-file-chip__remove:hover,
.mc-fs-file-chip__remove:focus-visible {
  background: rgba(2, 39, 62, 0.16);
  outline: 0;
}

.mc-fs-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.mc-fs-file-trigger {
  border: 0;
  background: #fff;
  color: #0c0308;
  min-height: 44px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  clip-path: polygon(
    var(--mc-chamfer-lg) 0,
    100% 0,
    100% calc(100% - var(--mc-chamfer-lg)),
    calc(100% - var(--mc-chamfer-lg)) 100%,
    0 100%,
    0 var(--mc-chamfer-lg)
  );
  cursor: pointer;
  transition:
    background-color 200ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.mc-fs-file-trigger::after {
  content: "↗";
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.mc-fs-file-trigger:hover,
.mc-fs-file-trigger:focus-visible {
  background: #f5f8fa;
  box-shadow: 0 0 0 2px rgba(15, 58, 87, 0.14);
  outline: 0;
}

.mc-fs-file-trigger:active {
  transform: translateY(1px);
}

.mc-fs-file-name {
  font-size: 14px;
  color: #3f5969;
}

.mc-fs-consent-field a {
  color: inherit;
  text-decoration: underline;
}

.mc-fs-submit {
  min-height: 44px;
  height: auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  padding: 14px;
  background: var(--mc-fs-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  clip-path: polygon(
    var(--mc-chamfer-lg) 0,
    100% 0,
    100% calc(100% - var(--mc-chamfer-lg)),
    calc(100% - var(--mc-chamfer-lg)) 100%,
    0 100%,
    0 var(--mc-chamfer-lg)
  );
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition:
    background-color 200ms ease,
    transform 120ms ease,
    opacity 120ms ease;
}

.mc-fs-submit::after {
  content: "↗";
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.mc-fs-submit:hover,
.mc-fs-submit:focus {
  background: var(--mc-fs-primary-hover);
}

.mc-fs-submit:active {
  transform: translateY(1px);
}

.mc-fs-submit[disabled] {
  opacity: 0.75;
  cursor: not-allowed;
}

.mc-fs-error {
  display: block;
  color: var(--mc-fs-error);
  font-size: 12px;
  margin-top: 4px;
}

.mc-fs-toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.mc-fs-toast {
  width: min(460px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid rgba(2, 39, 62, 0.12);
  box-shadow: 0 8px 24px rgba(2, 39, 62, 0.18);
  color: #02273e;
  pointer-events: auto;
  overflow: hidden;
}

.mc-fs-toast__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
}

.mc-fs-toast__message {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
}

.mc-fs-toast__close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: #02273e;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 0;
}

.mc-fs-toast__close svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.mc-fs-toast__progress {
  height: 3px;
  width: 100%;
  transform-origin: left center;
  background: #02273e;
}

.mc-fs-toast--error {
  border-color: rgba(179, 45, 46, 0.25);
}

.mc-fs-toast--error .mc-fs-toast__progress {
  background: #b32d2e;
}

.mc-fs-admin-wrap .mc-fs-admin-filters {
  margin: 12px 0 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.mc-fs-admin-wrap .mc-fs-admin-actions {
  display: flex;
  gap: 8px;
}

.mc-fs-admin-wrap .mc-fs-row-new td {
  font-weight: 600;
}

@media (max-width: 768px) {
  .mc-fs-submit {
    width: 100%;
  }
}
