.upload-reference-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.upload-native-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.upload-reference-card { min-width: 0; display: grid; gap: 12px; }
.upload-reference-card > h3 { margin: 0; color: var(--gs-text-secondary); font-size: 14px; line-height: 22px; font-weight: 400; }
.upload-state-list { display: grid; gap: 16px; }
.upload-button-state-reference { display: grid; gap: 48px; width: 280px; max-width: 100%; }
.upload-button-demo-card { margin-top: 16px; padding: 20px; border: 1px solid var(--gs-neutral-6); border-radius: var(--gs-radius-md); background: var(--gs-neutral-8); }
.upload-button-demo-card > p { margin: 0 0 16px; }
.upload-button-demo-card .upload-button-state-reference { margin: 0; }
.upload-button-state-reference .upload-state { box-sizing: border-box; width: 100%; max-width: 100%; height: 64px; gap: 8px; align-content: start; }
.upload-button-state-reference .upload-file-state { width: 100%; gap: 8px; }
.upload-button-state-reference .upload-file-field { width: 100%; grid-template-columns: 120px minmax(0, 1fr); gap: 0; }
.upload-button-state-reference .upload-file-state__row { box-sizing: border-box; width: 100%; max-width: 100%; }
.upload-button-state-reference .upload-file-state__row { gap: 8px; }
.upload-button-state-reference .upload-state > .upload-helper { box-sizing: border-box; height: 24px; min-height: 24px; line-height: 24px !important; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upload-button-state-reference .upload-file-input { display: none; }
.upload-button-state-reference .gs-upload-button { justify-self: start; }
.upload-state { min-width: 0; display: grid; gap: 8px; }
.upload-state__label { color: var(--gs-text-tertiary); font-size: 12px; line-height: 20px; }
.upload-helper { margin: 0; color: var(--gs-text-tertiary) !important; font-size: 12px !important; line-height: 20px !important; }
.upload-helper.is-error { color: var(--gs-red-2) !important; }
.gs-upload-image { box-sizing: border-box; position: relative; display: grid; place-items: center; width: 120px; height: 120px; overflow: hidden; border: 1px dashed var(--gs-neutral-7); border-radius: 0; background: var(--gs-neutral-8); color: var(--gs-text-tertiary); cursor: pointer; transition: border-color .16s ease, background-color .16s ease; }
.gs-upload-image:hover, .gs-upload-image.is-hover, .gs-upload-image:focus-visible { border-color: var(--gs-primary-2); }
.gs-upload-image:focus-visible { outline: 2px solid var(--gs-primary-3); outline-offset: 2px; }
.gs-upload-image.is-uploading { cursor: progress; }
.gs-upload-image.is-disabled { cursor: not-allowed; opacity: .72; }
.gs-upload-image__content { display: grid; place-items: center; gap: 10px; text-align: center; }
.gs-upload-image__content > span:last-child { width: 88px; color: var(--gs-text-tertiary); font-size: 12px; line-height: 20px; }
.gs-upload-add-icon { width: 24px; height: 24px; color: var(--gs-neutral-4); }
.gs-upload-spinner { width: 20px; height: 20px; border: 2px solid var(--gs-primary-3); border-top-color: transparent; border-radius: 50%; animation: gs-upload-spin .8s linear infinite; }
@keyframes gs-upload-spin { to { transform: rotate(360deg); } }
.gs-upload-image__preview { display: block; width: 104px; height: 104px; object-fit: cover; }
.gs-upload-image__overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 8px; background: rgb(20 23 26 / 55%); color: #fff; }
.gs-upload-image.is-preview:hover .gs-upload-image__overlay, .gs-upload-image.is-preview:focus-within .gs-upload-image__overlay, .gs-upload-image.is-preview.is-hover .gs-upload-image__overlay { display: flex; }
.gs-upload-image__overlay .gs-button.gs-button--icon { width: 40px; min-width: 40px; height: 40px; }
.gs-upload-image__overlay .gs-icon { width: 20px; height: 20px; color: currentColor; }
.gs-upload-image__overlay .gs-button { --button-color: #fff; color: #fff; }
.gs-upload-image__overlay .gs-button:hover:not(:disabled), .gs-upload-image__overlay .gs-button:focus-visible { --button-color: var(--gs-primary-2); color: var(--gs-primary-2); }
.gs-upload-image__overlay .gs-upload-divider { width: 1px; height: 16px; background: #fff; }
.gs-upload-preview-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 32px; }
.gs-upload-preview-modal__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgb(20 23 26 / 72%); cursor: default; }
.gs-upload-preview-modal__panel { position: relative; z-index: 1; display: grid; place-items: center; max-width: min(80vw, 720px); max-height: min(80vh, 720px); padding: 16px; border-radius: var(--gs-radius-md); background: #fff; box-shadow: 0 12px 32px rgb(20 23 26 / 24%); }
.gs-upload-preview-modal__image { display: block; max-width: min(70vw, 640px); max-height: min(70vh, 640px); object-fit: contain; }
.gs-upload-preview-modal__close { position: absolute; top: 8px; right: 8px; z-index: 1; color: var(--gs-neutral-3); background: #fff; border-radius: 50%; }
.gs-upload-preview-modal__close:hover:not(:disabled), .gs-upload-preview-modal__close:focus-visible { color: var(--gs-primary-2); background: var(--gs-primary-6); }
.gs-upload-button { width: 120px; min-width: 120px; }
.gs-upload-button__icon { width: 16px; height: 16px; flex: 0 0 16px; color: inherit; }
.upload-file-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.upload-input-state .upload-file-field { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.upload-file-input { box-sizing: border-box; display: flex; align-items: center; min-width: 0; height: 32px; padding: 0 8px; overflow: hidden; border: 1px solid var(--gs-neutral-7); border-radius: var(--gs-radius-sm); background: var(--gs-neutral-9); color: var(--gs-text-secondary); font-size: 14px; line-height: 22px; white-space: nowrap; text-overflow: ellipsis; }
.upload-file-name { display: flex; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.upload-file-name__base { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-file-name__extension { flex: 0 0 auto; white-space: nowrap; }
.upload-file-input > .upload-file-name { flex: 1 1 auto; }
.upload-file-input.is-placeholder { color: var(--gs-text-tertiary); }
.upload-file-input.is-disabled { background: var(--gs-neutral-8); color: var(--gs-text-tertiary); }
.gs-upload-image.is-disabled,
.gs-upload-image.is-disabled:hover,
.gs-upload-image.is-disabled.is-hover,
.gs-upload-image.is-disabled:focus,
.gs-upload-image.is-disabled:focus-visible { border-color: var(--gs-neutral-7); background: var(--gs-neutral-8); outline: 0; box-shadow: none; }
.gs-upload-image.is-disabled { pointer-events: none; }
.upload-file-input__status { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding-left: 8px; font: 400 12px/20px "DINPro", sans-serif; color: var(--gs-primary-2); }
.upload-file-input__status .gs-upload-spinner { width: 13px; height: 13px; border-width: 2px; }
.upload-file-input__status .gs-icon { width: 16px; height: 16px; }
.upload-file-input__status.is-success { color: var(--gs-green-2); }
.upload-file-input__status.is-error { color: var(--gs-red-2); }
.upload-input-remove { width: 64px; min-width: 64px; }
.upload-file-state { display: grid; gap: 8px; }
.upload-file-state__row { display: flex; align-items: center; width: 100%; height: 24px; min-height: 24px; gap: 16px; }
.upload-file-state__row .upload-helper, .upload-file-state__row .upload-file-name { min-width: 0; flex: 1 1 auto; }
.upload-file-state__row .upload-file-name { color: var(--gs-text-tertiary); font-size: 12px; line-height: 20px; }
.upload-file-state__row .gs-button { min-width: 96px; }
.upload-file-state__row .upload-file-remove { width: 24px; min-width: 24px; height: 24px; margin-left: auto; padding: 0; }
.upload-file-remove { width: 24px; min-width: 24px; height: 24px; padding: 0; }
.upload-file-remove .gs-icon { width: 16px; height: 16px; color: inherit; }
.upload-button-state-reference .upload-file-remove.gs-button--text:hover:not(:disabled), .upload-button-state-reference .upload-file-remove.gs-button--text:focus-visible { --button-color: var(--gs-red-2); color: var(--gs-red-2); }
.upload-file-action { color: var(--gs-primary-2); font-size: 14px; line-height: 22px; text-decoration: none; cursor: pointer; }
.upload-file-action:hover, .upload-file-action:focus-visible { color: var(--gs-primary-1); text-decoration: underline; }
.upload-file-action:focus-visible { outline: 2px solid var(--gs-primary-3); outline-offset: 2px; }
.upload-list-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.upload-list-panel { min-width: 0; display: grid; gap: 16px; }
.upload-list-panel.upload-single-example { box-sizing: border-box; height: 426px; row-gap: 8px; grid-template-rows: 32px minmax(0, 1fr) 34px; }
.upload-list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.upload-list-toolbar .upload-helper { flex: 1 1 220px; }
.upload-dropzone { box-sizing: border-box; min-height: 210px; display: grid; place-items: center; padding: 24px; border: 1px dashed var(--gs-neutral-7); color: var(--gs-text-tertiary); text-align: center; }
.upload-dropzone button { appearance: none; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.upload-dropzone button:hover, .upload-dropzone button:focus-visible { color: var(--gs-primary-2); }
.upload-dropzone button:focus-visible { outline: 2px solid var(--gs-primary-3); outline-offset: 3px; }
.upload-list-panel.upload-single-example .upload-table { display: grid; grid-template-rows: 46px 230px; height: 276px; }
.upload-list-panel.upload-single-example .upload-table thead,
.upload-list-panel.upload-single-example .upload-table tbody { display: block; width: 100%; }
.upload-list-panel.upload-single-example .upload-table tbody { height: 230px; overflow: hidden; vertical-align: top; }
.upload-list-panel.upload-single-example.has-upload-files .upload-table tbody { box-sizing: border-box; padding-top: 8px; }
.upload-list-panel.upload-single-example .upload-table thead tr,
.upload-list-panel.upload-single-example .upload-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) 72px 96px 72px; width: 100%; height: 46px; }
.upload-list-panel.upload-single-example .upload-table tbody tr:has(td[colspan]) { display: block; height: 230px; }
.upload-list-panel.upload-single-example .upload-table tbody tr:has(td[colspan]) td { display: block; box-sizing: border-box; width: 100%; height: 230px; padding: 0; }
.upload-list-panel.upload-single-example .upload-table tbody td[colspan="4"] { grid-column: 1 / -1; }
.upload-list-panel.upload-single-example .upload-dropzone { height: 230px; min-height: 230px; }
.upload-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.upload-table th, .upload-table td { height: 46px; padding: 0 16px; border-bottom: 1px solid var(--gs-neutral-7); color: var(--gs-text-secondary); font-size: 14px; line-height: 22px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-table th { color: var(--gs-text-tertiary); font-weight: 400; }
.upload-table th:nth-child(2), .upload-table td:nth-child(2) { width: 72px; }
.upload-table th:nth-child(3), .upload-table td:nth-child(3) { width: 96px; }
.upload-table th:last-child, .upload-table td:last-child { width: 72px; padding-right: 16px; }
.upload-list-panel.upload-single-example .upload-table tbody tr:not(:has(td[colspan])) td { display: flex; align-items: center; justify-content: flex-start; text-align: left; }
.upload-list-panel.upload-single-example .upload-table tbody tr:not(:has(td[colspan])) td .upload-file-name { justify-content: flex-start; text-align: left; }
.upload-list-panel.upload-single-example .upload-table tbody tr:not(:has(td[colspan])) td .upload-table__status { justify-content: flex-start; }
.upload-list-panel.upload-single-example .upload-table thead th { display: flex; align-items: center; justify-content: flex-start; text-align: left; }
.upload-table__status { display: inline-flex; align-items: center; gap: 4px; color: var(--gs-text-secondary); }
.upload-table__status img { width: 16px; height: 16px; flex: 0 0 16px; display: block; }
.upload-table__status--success { color: var(--gs-green-2); }
.upload-table__status--error { color: var(--gs-red-2); }
.upload-list-actions { display: flex; justify-content: flex-end; gap: 8px; }
.upload-list-actions .gs-button { min-width: 88px; }
.upload-a11y-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.upload-api-table { margin-top: 16px; }
@media (max-width: 900px) { .upload-reference-grid, .upload-list-layout { grid-template-columns: 1fr; }.upload-reference-card { max-width: 420px; }.upload-list-panel { max-width: none; } }
@media (max-width: 560px) { .upload-file-field { grid-template-columns: 1fr; gap: 8px; }.upload-file-state__row { flex-direction: column; align-items: flex-start; gap: 8px; height: auto; min-height: 24px; }.upload-file-state__row .gs-button { justify-self: start; }.upload-table th, .upload-table td { padding: 0 8px; }.upload-table th:last-child, .upload-table td:last-child { width: 42px; padding-right: 4px; }.upload-list-panel.upload-single-example .upload-table thead tr, .upload-list-panel.upload-single-example .upload-table tbody tr { grid-template-columns: minmax(0, 1fr) 56px 72px 42px; } }
@media (prefers-reduced-motion: reduce) { .gs-upload-spinner { animation: none; } }
