/* B2B-only attachment surface. The B2C upload flow is intentionally not
 * affected by this file. */

.b2b-attachment-upload {
  --b2b-upload-surface: #fbfaf7;
  --b2b-upload-line: #d7dffb;
  --b2b-upload-ink-soft: #667085;
}

.b2b-attachment-upload .upload-dropzone {
  position: relative;
  isolation: isolate;
  min-height: 168px;
  border-width: 1.5px;
  background: var(--accent-soft);
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out), box-shadow .2s var(--ease-out), transform .2s var(--ease-out);
}

.b2b-attachment-upload .upload-dropzone::after {
  position: absolute;
  inset: 11px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .66);
  border-radius: 14px;
  content: '';
  pointer-events: none;
}

.b2b-attachment-upload .upload-dropzone:hover,
.b2b-attachment-upload .upload-dropzone.over,
.b2b-attachment-upload .upload-dropzone:focus-visible {
  border-color: var(--accent);
  background: #e3e9ff;
  box-shadow: 0 12px 28px -22px rgba(46, 91, 255, .8);
}

.b2b-attachment-upload .upload-dropzone:focus-visible {
  outline: 3px solid rgba(46, 91, 255, .24);
  outline-offset: 3px;
}

.b2b-attachment-upload .upload-drop-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  box-shadow: 0 10px 25px -14px rgba(46, 91, 255, .72);
}

.b2b-attachment-upload .upload-file-card {
  min-height: 72px;
  padding: 12px 12px 12px 13px;
  border-color: #e2e0d8;
  background: var(--b2b-upload-surface);
  box-shadow: 0 8px 22px -22px rgba(23, 26, 31, .5);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease-out);
}

.b2b-attachment-upload .upload-file-card[data-state="ready"] {
  border-color: #d7dffb;
}

.b2b-attachment-upload .upload-file-card[data-state="uploading"] {
  border-color: #9fb3ff;
  box-shadow: 0 10px 26px -20px rgba(46, 91, 255, .65);
}

.b2b-attachment-upload .upload-file-card[data-state="success"] {
  border-color: #bfe2ce;
}

.b2b-attachment-upload .upload-file-card[data-state="error"] {
  border-color: #efc4bf;
}

.b2b-attachment-upload .upload-file-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.b2b-attachment-upload .upload-file-name {
  font-size: .78rem;
}

.b2b-attachment-upload .upload-file-meta {
  font-size: .66rem;
}

.b2b-attachment-upload .upload-file-remove {
  width: 36px;
  height: 36px;
}

.b2b-attachment-upload .upload-file-remove:focus-visible {
  outline: 3px solid rgba(46, 91, 255, .24);
  outline-offset: 2px;
}

.b2b-attachment-upload .upload-action {
  min-height: 52px;
}

.b2b-upload-orb {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.b2b-upload-orb .sc-thinking-orb__canvas {
  width: 30px;
  height: 30px;
}

/* The detail page used to keep the 430px phone shell on desktop. */
@media (min-width: 1024px) {
  body:not(.create-mode) {
    display: block;
    padding: 0;
    background: #edeae2;
  }

  body:not(.create-mode) .app {
    max-width: 1180px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 38px 56px 112px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  body:not(.create-mode) .top-nav {
    padding: 0 0 16px;
  }

  body:not(.create-mode) .heading {
    padding: 22px 0 10px;
  }

  body:not(.create-mode) .heading h1 {
    max-width: 18ch;
    font-size: clamp(2.25rem, 4vw, 3.6rem);
  }

  body:not(.create-mode) .heading p {
    max-width: 58ch;
    font-size: .92rem;
  }

  body:not(.create-mode) .segments {
    margin: 26px 0 28px;
  }

  body:not(.create-mode) #materialsPanel.active {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(360px, .82fr);
    column-gap: 28px;
    align-items: start;
  }

  body:not(.create-mode) #materialsPanel > .success-banner {
    grid-column: 1 / -1;
  }

  body:not(.create-mode) #materialsPanel > .section-label,
  body:not(.create-mode) #materialsPanel > .materials,
  body:not(.create-mode) #materialsPanel > #uploadStatus {
    grid-column: 1;
  }

  body:not(.create-mode) #materialsPanel > .b2b-attachment-upload {
    grid-column: 2;
    grid-row: 1 / span 4;
    position: sticky;
    top: 28px;
    margin-top: 0;
  }

  body:not(.create-mode) #materialsPanel > .success-banner ~ .b2b-attachment-upload {
    grid-row: 2 / span 4;
  }

  body:not(.create-mode) .materials {
    gap: 10px;
  }

  body:not(.create-mode) .material {
    min-height: 78px;
    padding: 16px 18px;
  }

  body:not(.create-mode) .material-name {
    font-size: .86rem;
  }

  body:not(.create-mode) #goalsPanel.active {
    max-width: 900px;
  }

  body.create-mode {
    display: block;
    padding: 0;
    background: #edeae2;
  }

  body.create-mode .app {
    max-width: 980px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 38px 56px 112px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  body.create-mode .top-nav {
    padding: 0 0 16px;
  }

  body.create-mode .create-wizard {
    border-radius: 30px;
  }

  body.create-mode .wizard-step {
    padding: 42px 56px 38px;
  }

  body.create-mode .wizard-step h1 {
    font-size: clamp(2rem, 4vw, 3.15rem);
  }

  body.create-mode .wizard-intro {
    font-size: .92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .b2b-attachment-upload .upload-dropzone,
  .b2b-attachment-upload .upload-file-card {
    transition: none;
  }
}
