.upload-header {
  justify-content: space-between;
  gap: 24px;
}

.header-action:focus-visible,
.primary-button:focus-visible,
.file-picker:focus-within,
.selected-file button:focus-visible {
  outline: 3px solid #f2b84b;
  outline-offset: 2px;
}

.upload-main {
  display: block;
}

.upload-layout {
  display: grid;
  width: min(1100px, 100%);
  min-height: calc(100vh - 168px);
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: clamp(48px, 8vw, 112px);
  align-items: center;
}

.upload-layout h1 {
  font-size: 64px;
}

.uploader {
  width: 100%;
  padding: 28px;
  border: 1px solid #aab6b9;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 16px 16px 0 #f2b84b;
}

.tool-heading {
  display: flex;
  margin-bottom: 26px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.tool-label {
  margin: 0 0 4px;
  color: #087e70;
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.tool-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.access-state {
  padding: 5px 8px;
  border: 1px solid #9dc6c0;
  border-radius: 4px;
  background: #e9f6f4;
  color: #075e54;
  font-size: 11px;
  font-weight: 720;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #4f5961;
  font-size: 12px;
  font-weight: 700;
}

.text-input {
  width: 100%;
  height: 44px;
  margin-bottom: 18px;
  padding: 0 12px;
  border: 1px solid #aab6b9;
  border-radius: 4px;
  outline: 0;
  background: #ffffff;
  color: #16181d;
}

.text-input:focus {
  border-color: #087e70;
  box-shadow: 0 0 0 3px rgb(8 126 112 / 16%);
}

.text-input:disabled {
  background: #eef2f3;
  color: #6a747c;
}

.file-picker {
  display: flex;
  min-height: 112px;
  padding: 20px;
  align-items: center;
  gap: 16px;
  border: 1px dashed #879499;
  border-radius: 6px;
  background: #f7f9fa;
  cursor: pointer;
}

.file-picker:hover,
.file-picker[data-dragging="true"] {
  border-color: #087e70;
  background: #eef8f6;
}

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

.picker-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid #087e70;
  border-radius: 50%;
  color: #087e70;
  font-size: 26px;
  line-height: 1;
}

.picker-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.picker-copy strong {
  font-size: 15px;
}

.picker-copy span {
  color: #6a747c;
  font-size: 12px;
}

.selected-file {
  display: flex;
  min-height: 72px;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #aab6b9;
  border-radius: 6px;
  background: #f7f9fa;
}

.selected-file div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.selected-file strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.selected-file span {
  color: #6a747c;
  font-size: 12px;
}

.selected-file button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4f5961;
  cursor: pointer;
  font-size: 24px;
}

.selected-file button:hover {
  background: #e4e9eb;
}

.upload-progress {
  margin-top: 18px;
}

.upload-progress div {
  display: flex;
  margin-bottom: 8px;
  align-items: center;
  justify-content: space-between;
  color: #4f5961;
  font-size: 12px;
}

.upload-progress progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #dfe5e7;
  accent-color: #087e70;
}

.primary-button {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  margin-top: 20px;
  padding: 0 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid #075e54;
  border-radius: 4px;
  background: #087e70;
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 720;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.primary-button:hover:not(:disabled) {
  background: #075e54;
  transform: translateY(-1px);
}

.primary-button:disabled {
  border-color: #aab6b9;
  background: #aab6b9;
  cursor: wait;
}

.form-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #5a656d;
  font-size: 12px;
  line-height: 1.5;
}

.form-status[data-state="error"] {
  color: #b42318;
}

.form-status[data-state="success"] {
  color: #067647;
  font-weight: 700;
}

.upload-result {
  margin-top: 14px;
  padding: 12px;
  border-left: 3px solid #087e70;
  background: #eef8f6;
}

.upload-result span {
  display: block;
  margin-bottom: 5px;
  color: #5a656d;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.upload-result code {
  display: block;
  overflow-wrap: anywhere;
  color: #16181d;
  font-size: 11px;
}

.upload-result a {
  display: inline-flex;
  min-height: 38px;
  margin-top: 12px;
  padding: 0 13px;
  align-items: center;
  border: 1px solid #075e54;
  border-radius: 4px;
  background: #ffffff;
  color: #075e54;
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
}

.upload-result a:hover {
  background: #e9f6f4;
}

@media (max-width: 820px) {
  .upload-layout {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .upload-layout h1 {
    font-size: 48px;
  }

  .uploader {
    width: calc(100% - 14px);
    max-width: 560px;
    box-shadow: 12px 12px 0 #f2b84b;
  }
}

@media (max-width: 470px) {
  .uploader {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .primary-button {
    transition: none;
  }
}
