@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #000000;
  --muted: rgba(0, 0, 0, 0.68);
  --line: rgba(0, 0, 0, 0.14);
  --line-strong: rgba(0, 0, 0, 0.24);
  --accent: #000000;
  --accent-soft: rgba(0, 0, 0, 0.08);
  --accent-soft-strong: rgba(0, 0, 0, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Work Sans", sans-serif;
}

button,
textarea,
input {
  font: inherit;
}

h1,
p {
  margin: 0;
}

.hidden {
  display: none !important;
}

.remote-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 24px 56px;
}

.remote-shell {
  width: min(100%, 540px);
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
}

.remote-logo {
  width: min(240px, 58vw);
  justify-self: center;
}

.remote-content {
  display: grid;
  align-content: center;
  gap: 18px;
}

h1 {
  font-size: clamp(2.5rem, 9vw, 4.25rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-align: center;
}

.remote-result-panel {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 12px 0 8px;
}

.remote-result-actions {
  display: flex;
  gap: 10px;
}

.remote-icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--accent);
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease, border-color 140ms ease;
}

.remote-icon-button:active,
.remote-primary-button:active,
.remote-tertiary-button:active {
  transform: translateY(1px);
}

.icon-mask {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.icon-share {
  mask-image: url("/assets/icons/Share.svg");
  -webkit-mask-image: url("/assets/icons/Share.svg");
}

.icon-copy {
  mask-image: url("/assets/icons/Copy.svg");
  -webkit-mask-image: url("/assets/icons/Copy.svg");
}

.remote-code {
  font-size: clamp(3rem, 16vw, 5rem);
  line-height: 0.86;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text);
}

.remote-result-note,
.remote-expiry-note,
.remote-status {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.73rem;
  color: var(--muted);
  text-align: center;
}

.remote-form {
  display: grid;
  gap: 12px;
}

.remote-form.hidden {
  display: none;
}

.remote-form textarea,
.remote-input {
  width: 100%;
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.remote-input {
  min-height: 58px;
}

.remote-form textarea::placeholder,
.remote-input::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

.remote-form textarea:focus,
.remote-input:focus {
  border-color: rgba(0, 0, 0, 0.9);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.remote-primary-button {
  min-height: 58px;
  padding: 16px 20px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease;
}

.remote-tertiary-button {
  justify-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-decoration: underline;
  text-underline-offset: 6px;
  cursor: pointer;
}

.remote-tertiary-button.hidden {
  display: none;
}

.remote-footer {
  display: grid;
  gap: 8px;
}

.remote-status {
  min-height: 1.2em;
}

.remote-status.is-error,
.delete-feedback.is-error {
  color: var(--text);
}

.delete-feedback {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.5;
  text-align: center;
}

.delete-feedback.hidden {
  display: none;
}

.delete-feedback.is-success {
  color: var(--text);
}

@media (hover: hover) and (pointer: fine) {
  .remote-primary-button:hover,
  .remote-tertiary-button:hover {
    opacity: 0.82;
  }

  .remote-icon-button:hover {
    background: #ffffff;
    border-color: var(--accent);
    opacity: 0.82;
  }
}

@media (max-width: 640px) {
  .remote-page {
    padding: 28px 16px 40px;
  }

  .remote-shell {
    min-height: calc(100vh - 68px);
    gap: 20px;
  }

  h1 {
    font-size: clamp(2.1rem, 12vw, 3.5rem);
  }

  .remote-logo {
    width: min(220px, 62vw);
  }

  .remote-code {
    letter-spacing: 0.1em;
  }
}
