/* Owner-requested compact Files uploader with equivalent local and organization choices. */
.app[data-design="enterprise"] .files-page .upload-form {
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, .6fr) auto;
  align-items: end;
  gap: 16px;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 150px;
  padding: 12px;
  border: 1px dashed var(--color-control-border);
  border-radius: var(--radius-surface, 12px);
  background: var(--color-subtle);
  color: var(--color-ink);
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker > .dropzone {
  box-sizing: border-box;
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  align-content: center;
  justify-content: normal;
  column-gap: 12px;
  row-gap: 2px;
  grid-column: 1;
  min-width: 0;
  min-height: 72px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-ink);
  text-align: start;
  cursor: pointer;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker > .dropzone > input[type="file"] {
  position: absolute;
  inset: 0;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker .upload-icon {
  display: grid;
  place-items: center;
  grid-column: 1;
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker .upload-icon > svg {
  width: 24px;
  height: 24px;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker > .dropzone > strong {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  max-width: 100%;
  color: var(--color-ink);
  font-size: .8125rem;
  font-weight: 650;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker > .dropzone > small {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  color: var(--color-secondary);
  font-size: .6875rem;
  font-weight: 400;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker-actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker-actions > .ghost {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: auto;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-control, 8px);
  background: var(--color-surface);
  color: var(--color-accent);
  font: inherit;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  box-shadow: none;
  cursor: pointer;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker-actions > .ghost > .icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker-actions > .ghost:hover:not(:disabled) {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker > .dropzone:focus-within,
.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker-actions > .ghost:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  box-shadow: none;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker-actions > .ghost:disabled {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-muted);
  opacity: .65;
  cursor: not-allowed;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker > .dropzone:has(input:disabled) {
  color: var(--color-muted);
  opacity: .65;
  cursor: not-allowed;
}

.app[data-design="enterprise"] .files-page .upload-form .files-upload-picker > .dropzone > input[type="file"]:disabled {
  cursor: not-allowed;
}

@media (max-width: 1020px) {
  .app[data-design="enterprise"] .files-page .upload-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .app[data-design="enterprise"] .files-page .upload-form .files-upload-picker {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .app[data-design="enterprise"] .files-page .upload-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .app[data-design="enterprise"] .files-page .upload-form > .primary {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .app[data-design="enterprise"] .files-page .upload-form .files-upload-picker-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
