/* Gemeinsame 3+1-Erweiterungen fuer Modal und eingebettetes Uploadformular. */
.upload-step-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.upload-step-heading-copy { min-width: 0; }

.upload-contact-field > label {
    display: block;
    margin-bottom: 4px;
    color: #374151;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.upload-contact-field > label span {
    color: #6b7280;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.upload-contact-channels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.upload-contact-channels label {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 8px 6px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    cursor: pointer;
    text-align: center;
}

.upload-contact-channels label:has(input:checked) {
    border-color: #75cc00;
    background: #f7fee7;
    color: #263d00;
    box-shadow: inset 0 0 0 1px #75cc00;
}

.upload-stepper .step {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
}

.upload-step-motif {
    width: 104px;
    height: 92px;
    object-fit: contain;
    justify-self: end;
    filter: drop-shadow(0 10px 16px rgba(18, 18, 18, .12));
}

.upload-set-readiness {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #6b7280;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.upload-set-readiness.is-complete {
    border-color: #75cc00;
    background: #f7fee7;
    color: #477800;
}

.upload-set-readiness.is-partial {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

.upload-set-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.upload-set-header .upload-set-readiness { justify-self: end; }

.upload-set-remove {
    color: #b91c1c;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.upload-set-details-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    justify-content: start;
    gap: 8px 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.upload-set-details-row legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    color: #4b5563;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.upload-supply-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
}

.upload-supply-check input { flex: 0 0 auto; margin-top: 2px; }
.upload-supply-check span { min-width: 0; overflow-wrap: anywhere; }
.upload-supply-check small { display: block; color: #6b7280; font-size: 10px; font-weight: 500; }
.upload-field-help { display: block; margin-top: 4px; color: #6b7280; font-size: 10px; line-height: 1.35; }

.upload-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 190px));
    justify-content: start;
    gap: 10px;
    margin-top: 12px;
}

.upload-file-card {
    border: 1px solid #d1d5db;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(18, 18, 18, .06);
}

.upload-file-card__preview {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f3f4f6;
}

.upload-file-card__meta {
    padding: 8px;
    border-top: 1px solid #e5e7eb;
}

.upload-file-card__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #374151;
    font-size: 10px;
    font-weight: 700;
}

.upload-file-kind-field {
    display: block;
    margin-top: 8px;
}

.upload-file-kind-label {
    display: block;
    margin-bottom: 4px;
    color: #374151;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .025em;
}

.upload-file-kind-label span { color: #b91c1c; }

.upload-file-kind-select {
    width: 100%;
    min-height: 40px;
    padding: 8px 28px 8px 9px;
    border: 1px solid #9ca3af;
    border-radius: 4px;
    background: #fff;
    color: #1f2937;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.upload-file-kind-select:invalid {
    border-color: #d97706;
    background: #fffbeb;
    color: #92400e;
}

.upload-file-kind-select:focus {
    outline: 3px solid rgba(117, 204, 0, .22);
    outline-offset: 1px;
    border-color: #75cc00;
    background: #fff;
}

.upload-file-kind-select[aria-invalid="true"] {
    border-color: #dc2626;
    box-shadow: 0 0 0 1px #dc2626;
}

.upload-summary-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(18, 18, 18, .04);
}

.upload-summary-card + .upload-summary-card { margin-top: 8px; }

.upload-summary-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.upload-summary-section-header h5 { margin: 0; }

.upload-summary-count {
    margin: 3px 0 0;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
}

.upload-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 0;
}

.upload-summary-value {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px 8px;
    color: #111827;
    font-weight: 700;
    text-align: right;
}

.upload-summary-edit {
    appearance: none;
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid #b8d78f;
    border-radius: 4px;
    background: #f7fee7;
    color: #4f8500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}

.upload-summary-edit:hover { border-color: #75cc00; background: #ecfccb; color: #315708; }
.upload-summary-edit:focus-visible { outline: 3px solid rgba(117, 204, 0, .25); outline-offset: 2px; }

.upload-summary-sets { display: grid; gap: 10px; }

.upload-summary-set {
    border: 1px solid #dbe2d7;
    border-left: 3px solid #75cc00;
    border-radius: 6px;
    background: #fbfcfa;
    padding: 12px;
}

.upload-summary-set-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid #e5e7eb;
}

.upload-summary-set-number {
    display: block;
    margin-bottom: 2px;
    color: #659f0b;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.upload-summary-set h6 {
    margin: 0;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.upload-summary-payout {
    flex: 0 0 auto;
    max-width: 46%;
    padding: 4px 7px;
    border-radius: 999px;
    background: #ecfccb;
    color: #497b00;
    font-size: 9px;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
}

.upload-summary-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px 12px;
    margin: 11px 0 0;
}

.upload-summary-fact { min-width: 0; }
.upload-summary-fact.is-long { grid-column: 1 / -1; }
.upload-summary-fact dt { color: #6b7280; font-size: 9px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.upload-summary-fact dd { margin: 2px 0 0; color: #1f2937; font-size: 11px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }

.upload-summary-files-block {
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid #e5e7eb;
}

.upload-summary-files-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #4b5563;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.upload-summary-files-heading strong {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #e8eee4;
    color: #374151;
    font-size: 10px;
    text-align: center;
}

.upload-summary-files { display: grid; gap: 5px; margin: 7px 0 0; padding: 0; list-style: none; }
.upload-summary-files li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.upload-summary-file-name { min-width: 0; display: inline-flex; align-items: center; gap: 6px; color: #374151; font-size: 10px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-summary-file-name i { flex: 0 0 auto; color: #659f0b; }
.upload-summary-file-kind { flex: 0 0 auto; padding: 3px 6px; border: 1px solid #d7dfd2; border-radius: 999px; background: #fff; color: #4b5563; font-size: 9px; font-weight: 800; }
.upload-summary-files-empty { margin: 7px 0 0; color: #9a3412; font-size: 10px; font-weight: 700; }

.upload-nonbinding-notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border-left: 3px solid #75cc00;
    background: #f7fee7;
    color: #4b5563;
    margin: 12px 0;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.45;
}

.upload-nonbinding-notice i { color: #6db300; margin-top: 2px; }

.upload-transfer-experience {
    position: fixed;
    inset: 0;
    z-index: 1000001;
    display: none;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(8, 12, 10, .72);
    backdrop-filter: blur(5px);
}

.upload-transfer-experience:not(.hidden) { display: flex; }

.upload-transfer-dialog {
    width: min(680px, 100%);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    border: 1px solid #cfe5ae;
    border-top: 3px solid #75cc00;
    border-radius: 12px;
    background: linear-gradient(145deg, #fff 0%, #f7fee7 100%);
    padding: 24px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, .38), 0 0 0 1px rgba(150, 255, 5, .08);
}

.upload-transfer-dialog:focus { outline: none; }
.upload-transfer-dialog:focus-visible { outline: 3px solid rgba(150, 255, 5, .45); outline-offset: 3px; }

.upload-transfer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #dce5d5;
}

.upload-transfer-action {
    appearance: none;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #aeb8aa;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    cursor: pointer;
}

.upload-transfer-action:hover { border-color: #75cc00; background: #f2f9e8; color: #315708; }
.upload-transfer-action:focus-visible { outline: 3px solid rgba(117, 204, 0, .3); outline-offset: 2px; }
.upload-transfer-action.is-primary { border-color: #75cc00; background: #96ff05; color: #101510; }
.upload-transfer-action.is-primary:hover { background: #baff4e; }
.upload-transfer-action.is-danger { border-color: #f0a6a6; color: #b91c1c; }
.upload-transfer-action.is-danger:hover { border-color: #dc2626; background: #fef2f2; color: #991b1b; }
.upload-transfer-action.hidden { display: none; }

.upload-transfer-experience[aria-hidden="true"] {
    visibility: hidden;
}

.upload-transfer-layout {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
}

.upload-transfer-copy { min-width: 0; }

.upload-progress-detail.hidden,
.upload-transfer-complete.hidden { display: none; }

.upload-transfer-phase {
    margin: 0 0 3px;
    color: #5d900f;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.upload-progress-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: #4b5563;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.upload-progress-heading strong {
    flex: 0 0 auto;
    color: #315708;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.upload-progress-track {
    height: 9px;
    margin-top: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.upload-progress-bar {
    min-width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width .24s ease;
}

.upload-progress-bar.is-indeterminate {
    min-width: 8%;
    animation: upload-progress-search 1.1s ease-in-out infinite alternate;
}

.upload-transfer-complete {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #b8d78f;
    border-radius: 7px;
    background: #f7fee7;
    color: #315708;
}

.upload-transfer-complete i {
    flex: 0 0 auto;
    color: #65a30d;
    font-size: 22px;
}

.upload-transfer-complete span {
    min-width: 0;
    font-size: 10px;
    line-height: 1.4;
}

.upload-transfer-complete strong {
    display: block;
    font-size: 11px;
    font-weight: 900;
}

@keyframes upload-progress-search {
    from { transform: translateX(0); }
    to { transform: translateX(1050%); }
}

.upload-progress-message {
    margin: 9px 0 0;
    color: #374151;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.upload-transfer-guidance {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.upload-transfer-stages {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.upload-transfer-stage {
    border-top: 3px solid #d1d5db;
    padding-top: 6px;
    color: #9ca3af;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}

.upload-transfer-stage.is-active,
.upload-transfer-stage.is-done {
    border-color: #75cc00;
    color: #477800;
}

.upload-transfer-stage.is-active { background: #f7fee7; }

.upload-transfer-stage.is-error {
    border-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

.upload-transfer-error {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #f3b4b4;
    border-left: 4px solid #dc2626;
    border-radius: 7px;
    background: #fff7f7;
    color: #4b1f1f;
    overflow-wrap: anywhere;
}

.upload-transfer-error.hidden { display: none; }

.upload-transfer-error strong {
    display: block;
    color: #991b1b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.upload-transfer-error p {
    margin: 6px 0 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
}

.upload-transfer-error p + p {
    padding-top: 6px;
    border-top: 1px solid #f5d6d6;
}

.upload-transfer-experience.is-error .upload-transfer-dialog {
    border-color: #efb2b2;
    border-top-color: #dc2626;
    background: linear-gradient(145deg, #fff 0%, #fff8f8 100%);
}

.upload-success-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    align-items: center;
    gap: 28px;
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
}

.upload-success-motif {
    width: 170px;
    height: 170px;
    object-fit: contain;
    filter: drop-shadow(0 14px 24px rgba(117, 204, 0, .22));
}

.upload-success-contact {
    border-left: 3px solid #75cc00;
    background: rgba(247, 254, 231, .95);
    color: #374151;
    margin: 14px 0 20px;
    padding: 10px 12px;
    font-size: 12px;
}

@media (max-width: 640px) {
    .upload-step-heading { grid-template-columns: minmax(0, 1fr) 72px; gap: 10px; }
    .upload-summary-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
    .upload-summary-card { padding: 12px; }
    .upload-summary-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .upload-summary-files li { align-items: flex-start; flex-direction: column; gap: 4px; }
    .upload-step-motif { width: 72px; height: 68px; }
    .upload-transfer-layout { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; }
    .upload-transfer-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .upload-transfer-experience {
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    }
    .upload-transfer-dialog { width: 100%; max-height: calc(100dvh - 24px); padding: 18px 16px; border-radius: 10px; }
    .upload-progress-heading { margin-top: 9px; }
    .upload-progress-message { font-size: 11px; }
    .upload-transfer-actions { align-items: stretch; flex-direction: column; }
    .upload-transfer-action { width: 100%; }
    .upload-success-layout { grid-template-columns: 1fr; text-align: center; }
    .upload-success-motif { width: 126px; height: 126px; justify-self: center; grid-row: 1; }
    .upload-success-contact { text-align: left; }
    .upload-set-header { grid-template-columns: auto minmax(0, 1fr); }
    .upload-set-header .upload-set-readiness { justify-self: end; text-align: center; }
    .upload-set-remove { grid-column: 1 / -1; justify-self: end; }
    .upload-set-details-row { grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 8px; }
    .upload-file-grid { grid-template-columns: minmax(0, 1fr); }
    .upload-file-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); min-height: 112px; }
    .upload-file-card__preview { aspect-ratio: auto; min-height: 112px; }
    .upload-file-card__meta { min-width: 0; border-top: 0; border-left: 1px solid #e5e7eb; }
    .upload-choice-card-sm { min-height: 0 !important; display: grid !important; grid-template-columns: minmax(92px, .65fr) minmax(0, 1.35fr); align-items: center !important; }
    .upload-summary-row.is-long { grid-template-columns: 1fr; gap: 3px; }
    .upload-summary-row.is-long .upload-summary-value { justify-content: flex-start; text-align: left; }
}

@media (max-width: 380px) {
    .upload-contact-channels { grid-template-columns: 1fr; }
    .upload-contact-channels label { min-height: 40px; justify-content: flex-start; padding-left: 12px; }
    .upload-summary-row { grid-template-columns: 1fr; gap: 2px; }
    .upload-summary-value { justify-content: flex-start; text-align: left; }
    .upload-summary-section-header, .upload-summary-set-header { align-items: stretch; flex-direction: column; }
    .upload-summary-edit { align-self: flex-start; }
    .upload-summary-payout { max-width: 100%; align-self: flex-start; }
    .upload-summary-facts { grid-template-columns: 1fr; }
    .upload-summary-fact.is-long { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .upload-step-panel.is-visible { animation: none !important; }
    .upload-progress-bar { transition: none !important; }
    .upload-progress-bar.is-indeterminate { animation: none !important; }
}
/* Bildgestuetzte Abwicklung je Set; gemeinsam fuer Modal und upload.html. */
.upload-payout-fieldset { min-width: 0; }
.upload-payout-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.upload-payout-options .upload-payout-card {
    position: relative; display: flex !important; flex-direction: column;
    align-items: stretch !important; gap: 8px; padding: 12px;
    min-width: 0; border-radius: 10px;
}
.upload-payout-options .upload-payout-card input[type="radio"] {
    position: absolute; top: 10px; right: 10px; width: 18px; height: 18px;
    opacity: 1; margin: 0; accent-color: #65a30d; z-index: 1;
}
.upload-payout-card:has(input:focus-visible) { outline: 3px solid #365314; outline-offset: 3px; }
.upload-payout-card .upload-payout-visual {
    display: flex; align-items: center; justify-content: center;
    height: 94px; margin: 8px 14px 0;
}
.upload-payout-visual img { display: block; width: 100%; height: 100%; object-fit: contain; }
.upload-payout-question {
    display: flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; border: 2px solid #9ca3af; border-radius: 50%;
    color: #4b5563; font-size: 30px; font-weight: 700;
}
.upload-payout-card .upload-payout-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.upload-payout-options .upload-payout-card .upload-choice-title { font-size: 13px; }
.upload-payout-options .upload-payout-card .upload-choice-help { font-size: 12px; line-height: 1.4; }
@media (max-width: 639px) {
    .upload-payout-options { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .upload-payout-options .upload-payout-card {
        display: grid !important; grid-template-columns: 64px minmax(0, 1fr);
        align-items: center !important; gap: 10px; padding: 10px 36px 10px 10px; min-height: 84px !important;
    }
    .upload-payout-card .upload-payout-visual { height: 60px; margin: 0; }
    .upload-payout-question { width: 42px; height: 42px; font-size: 25px; }
}
