:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #1e1e1e;
  --muted: #6d6d6d;
  --line: #d8d8d8;
  --line-strong: #bfbfbf;
  --accent: #111111;
  --error: #c1121f;
  --success: #1f7a1f;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.app {
  padding: 0;
}

.panel {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 36px;
  background: var(--panel);
}

.panel__header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel__shop {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0 0 12px;
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.6rem, 2vw, 2rem);
}

h2 {
  font-size: 1.3rem;
}

.intro,
#status-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

.field span {
  font-weight: 600;
}

.consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 0.95rem;
  line-height: 1.6;
}

.consent input {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  -webkit-appearance: checkbox;
  appearance: auto;
}

.consent span {
  color: var(--text);
}

.consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

input,
select,
textarea,
.button {
  font: inherit;
}

input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  transition: border-color 160ms ease;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  width: 100%;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.button--secondary {
  background: #fff;
  color: var(--accent);
}

.form-error {
  margin: 0;
  color: var(--error);
  line-height: 1.5;
}

.loading-view,
.status-view {
  display: grid;
  gap: 16px;
  padding: 28px 0 8px;
  justify-items: start;
}

.status-view[data-status="success"] h2 {
  color: var(--success);
}

.status-view[data-status="error"] h2 {
  color: var(--error);
}

.loader {
  width: 32px;
  height: 32px;
  border: 2px solid #dcdcdc;
  border-top-color: #111111;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-view p,
.status-view p {
  max-width: 42rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

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

@media (max-width: 640px) {
  .panel {
    padding: 24px 16px 28px;
  }

  h1 {
    font-size: 1.45rem;
  }

  input,
  select,
  textarea,
  .button {
    font-size: 16px;
  }
}
