:root {
  color: #080a09;
  background: #f5f9ff;
  font:
    400 16px/1.5 "Instrument Sans",
    "Helvetica Neue",
    Arial,
    system-ui,
    sans-serif;
  --ink-muted: #425366;
  --line: #c9d2de;
  --blue: #0068ff;
  --error: #a41d1d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

main {
  width: min(100% - 32px, 480px);
  margin: clamp(16px, 7vh, 72px) auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
}

.embedded {
  min-height: 100vh;
  background: #fff;
}

.embedded main {
  width: 100%;
  margin: 0;
  border: 0;
}

header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-bottom: 1px solid #e0e7ef;
  font-size: 14px;
  font-weight: 700;
}

.embedded header {
  position: sticky;
  z-index: 1;
  top: 0;
  min-height: 64px;
  padding-right: 64px;
  background: #fff;
}

.mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
}

.brand-logo {
  flex: none;
  object-fit: contain;
}

section {
  padding: 20px 24px max(24px, env(safe-area-inset-bottom));
}

h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.2;
}

p {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 14px;
}

form {
  display: grid;
}

label {
  margin: 12px 0 4px;
  font-size: 14px;
  font-weight: 600;
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  font: inherit;
}

input,
select,
textarea {
  min-height: 42px;
  padding: 8px 10px;
  background: #fff;
  color: inherit;
}

textarea {
  resize: vertical;
}

input[type="file"] {
  min-width: 0;
  font-size: 14px;
}

form details {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

form summary {
  color: #0047c7;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.details-fields {
  display: grid;
}

.details-fields input,
.details-fields select {
  min-width: 0;
}

.amount-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 8px;
}

.screenshot-picker button {
  width: auto;
  margin: 0;
  border-color: var(--line);
  background: #fff;
  color: #0047c7;
  font-size: 14px;
}

.screenshot-picker button:hover {
  border-color: var(--blue);
  background: #f5f9ff;
}

#screenshot-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

#screenshot-list:empty,
#screenshot-status:empty {
  display: none;
}

#screenshot-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 8px 2px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
}

#screenshot-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#screenshot-list button {
  flex: none;
  border-color: transparent;
}

.support-choices {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.support-choices a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 16px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #172632;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.support-choices a:hover {
  border-color: var(--blue);
  background: #f5f9ff;
}

.support-choices a::after {
  width: 7px;
  height: 7px;
  border-top: 2px solid #425366;
  border-right: 2px solid #425366;
  content: "";
  transform: rotate(45deg);
}

.support-choice-icon {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #edf4ff;
  color: #0047c7;
}

.support-choice-icon::before,
.support-choice-icon::after {
  box-sizing: border-box;
  content: "";
}

[data-type="refund"] .support-choice-icon::before {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-30deg);
}

[data-type="refund"] .support-choice-icon::after {
  position: absolute;
  top: 9px;
  left: 10px;
  width: 7px;
  height: 7px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-12deg);
}

[data-type="payment-issue"] .support-choice-icon::before {
  width: 19px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

[data-type="payment-issue"] .support-choice-icon::after {
  position: absolute;
  top: 16px;
  width: 17px;
  border-top: 2px solid currentColor;
}

[data-type="inquire"] .support-choice-icon::before {
  width: 18px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 4px;
  transform: translateY(-1px);
}

[data-type="inquire"] .support-choice-icon::after {
  position: absolute;
  bottom: 10px;
  left: 13px;
  width: 6px;
  height: 6px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  background: #edf4ff;
  transform: skewY(-32deg);
}

.support-back {
  display: inline-block;
  margin-bottom: 12px;
  color: #0047c7;
  font-size: 14px;
}

small {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 12px;
}

button {
  min-height: 44px;
  margin-top: 16px;
  padding: 8px 12px;
  border-color: #0054d6;
  background: #0054d6;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: #0047c7;
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

[aria-invalid="true"] {
  border-color: var(--error);
}

.error,
.notice {
  color: var(--error);
}

.reference {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
}

.reference span {
  color: var(--ink-muted);
  font-size: 13px;
}

.reference-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.reference-actions button {
  width: auto;
  margin: 0;
  font-size: 14px;
}

.verification {
  min-width: 0;
}

.verification:has(#verification-status:not(:empty)) {
  margin-top: 12px;
}

.verification button {
  width: auto;
  margin-top: 6px;
}

.verification small:empty {
  display: none;
}

.reference small:empty {
  margin: 0;
}

.reference strong {
  overflow-wrap: anywhere;
  font-family: "Chivo Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

@media (max-width: 420px) {
  header,
  section {
    padding-right: 16px;
    padding-left: 16px;
  }
}
