:root {
  color-scheme: dark;
  --page: #202939;
  --surface: rgba(255, 255, 255, 0.09);
  --surface-hover: rgba(255, 255, 255, 0.13);
  --border: rgba(248, 250, 252, 0.2);
  --border-strong: rgba(248, 250, 252, 0.35);
  --text: #f8fafc;
  --muted: #aeb9c9;
  --placeholder: #8791a1;
  --accent: #32d583;
  --accent-hover: #27c676;
  --danger: #fb7185;
  --danger-bg: rgba(251, 113, 133, 0.1);
}

[data-theme="light"] {
  color-scheme: light;
  --page: #fff;
  --surface: rgba(15, 23, 42, 0.055);
  --surface-hover: rgba(15, 23, 42, 0.09);
  --border: rgba(15, 23, 42, 0.22);
  --border-strong: rgba(15, 23, 42, 0.38);
  --text: #172033;
  --muted: #5f6b7d;
  --placeholder: #778296;
  --accent: #16b86f;
  --accent-hover: #109d5e;
  --danger: #e11d48;
  --danger-bg: rgba(225, 29, 72, 0.08);
}

[data-theme="encryptsim"] {
  color-scheme: dark;
  --page: transparent;
  --surface: #364152;
  --surface-hover: #4b5565;
  --border: #4b5565;
  --border-strong: #697586;
  --text: #f8fafc;
  --muted: #9aa4b2;
  --placeholder: #697586;
  --accent: #32d583;
  --accent-hover: #12b76a;
  --danger: #fb7185;
  --danger-bg: rgba(251, 113, 133, 0.12);
}

[data-theme="encryptsim"][data-embed="true"],
[data-theme="encryptsim"][data-embed="true"] body {
  background: #121926;
}

[data-theme="encryptsim"] .form-shell {
  width: 100%;
  max-width: 720px;
  margin: 0;
  padding: 8px 0 48px;
}

[data-theme="encryptsim"] #support-form {
  gap: 20px;
}

[data-theme="encryptsim"] .field label,
[data-theme="encryptsim"] .field-label {
  color: #eef2f6;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

[data-theme="encryptsim"] input,
[data-theme="encryptsim"] textarea {
  background: #202939;
  border-color: #4b5565;
  border-radius: 8px;
}

[data-theme="encryptsim"][data-embed="true"] input,
[data-theme="encryptsim"][data-embed="true"] textarea {
  background: rgba(54, 65, 82, 0.45);
  border-color: #4b5565;
}

[data-theme="encryptsim"] .select-frame {
  background: #202939;
  border-color: #4b5565;
  border-radius: 8px;
}

[data-theme="encryptsim"][data-embed="true"] .select-frame {
  background: rgba(54, 65, 82, 0.45);
  border-color: #4b5565;
}

[data-theme="encryptsim"][data-embed="true"] .input-with-icon svg {
  fill: #697586;
}

[data-theme="encryptsim"] input:focus,
[data-theme="encryptsim"] textarea:focus,
[data-theme="encryptsim"] .select-control.is-open .select-frame,
[data-theme="encryptsim"] .select-frame:focus-within {
  border-color: #32d583;
  box-shadow: 0 0 0 1px rgba(50, 213, 131, 0.2);
}

[data-theme="encryptsim"] .select-menu {
  background: #202939;
  border-color: #4b5565;
}

[data-theme="encryptsim"] .select-option:hover,
[data-theme="encryptsim"] .select-option:focus,
[data-theme="encryptsim"] .select-option[aria-selected="true"] {
  background: #364152;
}

[data-theme="encryptsim"] .radio-option span {
  border-radius: 10px;
  background: #202939;
}

[data-theme="encryptsim"][data-embed="true"] .radio-option span {
  background: rgba(54, 65, 82, 0.35);
  border: 1px solid #4b5565;
}

[data-theme="encryptsim"] .radio-option input:checked + span {
  background: rgba(50, 213, 131, 0.12);
}

[data-theme="encryptsim"] .radio-option input:checked + span::before {
  box-shadow: inset 0 0 0 5px #202939;
}

[data-theme="encryptsim"][data-embed="true"] .radio-option input:checked + span::before {
  box-shadow: inset 0 0 0 5px #121926;
}

[data-theme="encryptsim"] .drop-zone {
  border-radius: 10px;
  background: #202939;
  color: #cdd5df;
}

[data-theme="encryptsim"][data-embed="true"] .drop-zone {
  background: rgba(54, 65, 82, 0.35);
  border-color: #4b5565;
}

[data-theme="encryptsim"] .file-item {
  background: #202939;
  border-radius: 8px;
}

[data-theme="encryptsim"][data-embed="true"] .file-item {
  background: rgba(54, 65, 82, 0.35);
  border: 1px solid #4b5565;
}

[data-theme="encryptsim"] .submit-button {
  min-height: 48px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 1px 20px -4px rgba(65, 70, 78, 0);
}

[data-theme="encryptsim"] .submit-button:hover {
  box-shadow: 0 12px 20px -6px rgba(65, 70, 78, 0.2);
}

[data-theme="encryptsim"] .info-notice {
  border-color: #4b5565;
  border-radius: 10px;
  background: rgba(54, 65, 82, 0.45);
  color: #cdd5df;
}

[data-theme="encryptsim"] .info-icon {
  background: #32d583;
  color: #121926;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: var(--page);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.3;
}

button,
input,
textarea {
  font: inherit;
}

.form-shell {
  width: min(790px, calc(100% - 60px));
  margin: 0 auto;
  padding: 80px 0 96px;
}

[data-embed="true"] .form-shell {
  width: 100%;
  padding: 0;
}

[data-embed="true"],
[data-embed="true"] body {
  background: transparent;
}

#support-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#dynamic-fields {
  display: contents;
}

.field {
  min-width: 0;
}

.field label,
.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 19.5px;
}

.field label span,
.field-label span {
  color: var(--muted);
}

.field-help {
  display: block;
  margin: -5px 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 17px;
}

input,
textarea {
  display: block;
  width: 100%;
  margin: 0;
  border: 1px solid var(--border);
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 18px;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

input {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 4px;
}

textarea {
  min-height: 126px;
  padding: 8px 12px;
  border-radius: 6px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

input:hover,
textarea:hover,
.select-frame:hover {
  border-color: var(--border-strong);
}

input:focus,
textarea:focus,
.select-control.is-open .select-frame,
.select-frame:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(50, 213, 131, 0.14);
}

.input-with-icon {
  position: relative;
}

.input-with-icon svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  fill: #c2cad6;
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 40px;
}

.select-control {
  position: relative;
  width: 100%;
}

.select-frame {
  position: relative;
  display: flex;
  width: 100%;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.select-trigger {
  display: block;
  min-width: 0;
  min-height: 0;
  height: 36px;
  flex: 1;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  padding: 8px 43px 8px 11px;
  color: var(--text);
  line-height: 18px;
  text-align: left;
  box-shadow: none;
}

.select-control:has(.select-clear) .select-trigger {
  padding-right: 76px;
}

.select-trigger:hover,
.select-trigger:focus {
  border: 0;
  box-shadow: none;
}

.select-clear {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 36px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  outline: 0;
  background: transparent;
  color: #697386;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.select-clear:hover {
  color: var(--text);
}

.select-divider {
  position: absolute;
  top: 7px;
  right: 35px;
  width: 1px;
  height: 24px;
  background: var(--border);
  pointer-events: none;
}

.select-chevron {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  border-right: 2px solid #758094;
  border-bottom: 2px solid #758094;
  pointer-events: none;
}

.select-control.is-open .select-chevron {
  top: 17px;
  transform: rotate(225deg);
}

.select-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #303a4b;
  padding: 4px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .select-menu {
  background: #fff;
}

.select-option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 3px;
  background: transparent;
  padding: 8px 10px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.select-empty {
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
}

.select-option:hover,
.select-option:focus,
.select-option[aria-selected="true"] {
  outline: 0;
  background: rgba(255, 255, 255, 0.1);
}

.select-control.invalid .select-frame,
.field.invalid input,
.field.invalid textarea,
.field.invalid .select-frame {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.12);
}

.field.invalid > label,
.field.invalid > .field-label {
  color: var(--danger);
}

.field-error {
  display: block;
  margin-top: 5px;
  color: var(--danger);
  font-size: 12px;
  line-height: 16px;
}

.radio-group {
  display: grid;
  width: max-content;
  gap: 10px;
}

.radio-option {
  position: relative;
  display: block;
  min-width: 123px;
  margin: 0 !important;
  cursor: pointer;
}

.radio-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.radio-option span {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 12px;
  color: var(--text);
  font-weight: 400;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease,
    transform 100ms ease;
}

.radio-option span::before {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  content: "";
  box-shadow: inset 0 0 0 5px transparent;
  transition: all 140ms ease;
}

.radio-option input:focus-visible + span,
.radio-option input:checked + span {
  border-color: var(--accent);
  background: rgba(50, 213, 131, 0.1);
}

.radio-option:hover span {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.radio-option:hover input:checked + span {
  border-color: var(--accent);
  background: rgba(50, 213, 131, 0.16);
  box-shadow: 0 0 0 1px rgba(50, 213, 131, 0.12);
}

.radio-option:active span {
  transform: scale(0.985);
}

.radio-option input:checked + span::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 5px #202939;
}

[data-theme="light"] .radio-option input:checked + span::before {
  box-shadow: inset 0 0 0 5px #fff;
}

.date-time-control {
  display: flex;
  width: min(300px, 100%);
}

.date-part {
  position: relative;
  display: flex;
  width: 160px;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px 0 0 4px;
  background: var(--surface);
}

.date-part:focus-within {
  z-index: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(50, 213, 131, 0.14);
}

.date-part > input[type="text"] {
  min-width: 0;
  height: 36px;
  min-height: 0;
  flex: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 10px;
  box-shadow: none;
}

.calendar-button {
  display: grid;
  width: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.calendar-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.native-date-picker {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.date-time-control .time-select {
  min-width: 0;
  flex: 1;
}

.date-time-control .time-select .select-frame {
  border-left: 0;
  border-radius: 0 4px 4px 0;
}

.date-time-control .time-select .select-menu {
  min-width: 170px;
}

.conditional-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 17px;
}

.info-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: -2px;
  border: 1px solid #5ba7ff;
  border-radius: 7px;
  padding: 15px 17px;
  color: #58a6ff;
  font-size: 14px;
  line-height: 19px;
}

.info-notice strong {
  display: block;
}

.info-notice p {
  margin: 0;
}

.info-icon {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: #58a6ff;
  color: #202939;
  font-size: 12px;
  font-weight: 700;
}

.drop-zone {
  position: relative;
  display: grid;
  min-height: 76px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  background: transparent;
  color: #d5dbe5;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: rgba(50, 213, 131, 0.06);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: #d5dbe5;
  stroke: none;
}

.upload-prompt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  line-height: 22px;
}

.browse-text {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-limit {
  color: var(--muted);
  font-size: 13px;
}

.file-list {
  display: grid;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}

.file-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  color: var(--muted);
  font-size: 13px;
}

.remove-file {
  min-height: 26px;
  padding: 2px 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.remove-file:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.submit-button,
.secondary-button {
  align-self: flex-start;
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 12px 24px;
  color: #fff;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 147px;
  background: var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  font-size: 16px;
}

.submit-button:hover {
  background: var(--accent-hover);
}

.submit-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.spinner {
  display: none;
  width: 17px;
  height: 17px;
  margin-left: 9px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.submit-button.is-loading .spinner {
  display: block;
}

.notice {
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 14px;
}

.error-notice {
  border: 1px solid rgba(251, 113, 133, 0.45);
  background: var(--danger-bg);
  color: #fecdd3;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.success-state {
  max-width: 620px;
  padding-top: 60px;
}

.success-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(50, 213, 131, 0.12);
}

.success-icon svg {
  width: 27px;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.success-state h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
}

.success-state p {
  margin: 0 0 12px;
  color: #b2c8de;
}

.ticket-reference {
  font-weight: 600;
}

.secondary-button {
  margin-top: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.secondary-button:hover {
  background: var(--surface-hover);
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .form-shell {
    padding-top: 20px;
    padding-bottom: 54px;
  }
}

@media (max-width: 420px) {
  .form-shell {
    width: calc(100% - 28px);
  }

  .radio-group,
  .radio-option {
    width: 100%;
  }

  .submit-button,
  .secondary-button {
    width: 100%;
  }
}
