
/* ==========================================================================
   0 = Schrift & Palette
   ========================================================================== */

@font-face {
  font-family: "Source Sans 3";
  src: url(source-sans-3-latin.woff2) format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --tinte:       #0f172a;   /* Text */
  --grau:        #475569;   /* Sekundärtext */
  --blau:        #2563eb;   /* Links, Primär */
  --teal:        #0d9488;   /* Akzent */
  --teal-dunkel: #0f766e;   /* Akzent auf Weiß — #0d9488 schafft nur 3,9:1 */
  --linie:       #e2e8f0;   /* Kanten */
  --glas:        rgb(255 255 255 / 0.75);
  --glas-kante:  rgb(255 255 255 / 0.8);
  --zebra:       rgb(255 255 255 / 0.45);
  --rot:         #dc2626;   /* Fehler */
  --lauf:        "Source Sans 3", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --karte:       0 8px 30px rgb(15 23 42 / 0.07);
}

/* ==========================================================================
   1 = Grundlayout
   ========================================================================== */

body {
  background: linear-gradient(165deg, #f8fafc 0%, #eef4ff 45%, #fdf6ec 100%);
  background-attachment: fixed;
  font: 400 17px/1.65 var(--lauf);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  color: var(--tinte);
  min-height: 100vh;
}

#content {
  padding: 2em;
}

h1 {
  text-align: center;
  margin: 1em auto 0.5em;
}

h1 a {
  display: block;
  background: url(logo.svg) no-repeat center top;
  background-size: 76px 76px;
  padding-top: 92px;
  color: var(--tinte);
  font-size: 1.5em;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

h1 a:hover {
  color: var(--blau);
}

h2 {
  text-align: center;
  color: var(--tinte);
  font-weight: 650;
}

fieldset {
  border: 1px solid var(--glas-kante);
  padding: 1.75em;
  margin: 0 auto;
  border-radius: 16px;
  width: 20em;
  min-height: 15em;
  min-width: 30em;
  position: relative;
  background: var(--glas);
  box-shadow: var(--karte);
}

legend {
  padding: 0.4em 1.1em;
  background: #ffffff;
  color: var(--tinte);
  font-size: 1.05em;
  display: block;
  min-width: 8em;
  text-align: center;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.06);
}

a,
table a {
  color: var(--blau);
}

a:hover,
table a:hover,
table a:focus {
  color: var(--teal-dunkel);
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--blau);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Der Knopf ist die zweite und letzte Verlaufsstelle. */
input[type="submit"] {
  background: linear-gradient(90deg, var(--blau), var(--teal));
  border: 0;
  padding: 0.7em 1.9em;
  font-size: 1em;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  margin: 10px;
  transition: filter .18s, transform .18s;
}

input[type="submit"]:hover,
input[type="submit"]:focus {
  filter: brightness(1.08);
}

select,
input[type="text"],
input[type="password"] {
  border: 1px solid var(--linie);
  background: #fff;
  padding: 9px 12px;
  font-size: 1em;
  font-family: inherit;
  color: var(--tinte);
  border-radius: 8px;
}

select { width: 100%; }

.inner {
  margin-top: 3em;
}

#upload fieldset {
  background: var(--glas) url(upload.svg) no-repeat center;
  background-size: 200px auto;
  transition: border-color .2s ease;
}

#upload fieldset:hover {
  border-color: var(--blau);
}

#upload > form {
  text-align: center;
}

#upload p {
  margin: 0;
}

/* Hinweis auf die Ablagefläche. Ohne pointer-events:none läge er über dem
   unsichtbaren Dateifeld und würde Klick wie Ablage abfangen. */
.ablage-hinweis {
  text-align: center;
  color: var(--grau);
  font-size: 0.95em;
  margin: 0.25em 0 0;
  pointer-events: none;
  transition: color .15s;
}

#upload fieldset.ablage-aktiv {
  border-color: var(--blau);
  background-color: rgb(37 99 235 / 0.07);
}

#upload fieldset.ablage-aktiv .ablage-hinweis {
  color: var(--blau);
  font-weight: 600;
}

#upload.file-selected .ablage-hinweis {
  display: none;
}

#file_select {
  position: relative;
  width: 100%;
  height: 16em;
  cursor: pointer;
  opacity: 0;
}
  #upload.file-selected #file_select {
    opacity: 1;
    height: 2em;
  }
  #upload.file-selected fieldset {
    background-image: none;
  }

/* ==========================================================================
   2 = Fußzeile
   ========================================================================== */

#copyright {
  text-align: center;
  font-size: 0.82em;
  color: var(--grau);
  margin: 3em auto;
}

#copyright a {
  color: var(--grau);
  text-decoration: none;
}

#copyright a:hover,
#copyright a:focus {
  color: var(--blau);
  text-decoration: underline;
}

/* ==========================================================================
   3 = Optionen
   ========================================================================== */

#options {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 90%;
}

#options tr { height: 2.7em; }

#option_table tr:first-child {
  width: 100%;
  height: 100%;
}

#options input[type="submit"] {
  position: relative;
  margin: 1em auto;
}

/* ==========================================================================
   4 = Upload
   ========================================================================== */

#upload_finished,
#uploading,
.message,
.info,
.error {
  text-align: center;
  color: var(--tinte);
  padding-left: 3em;
}

#upload_finished > p:nth-child(1) {
  color: var(--tinte);
  font-weight: 600;
}

#upload_finished div p:nth-child(1) {
  font-weight: 600;
}

#upload_finished a,
#uploading a {
  text-decoration: none;
  color: var(--blau);
}

#uploading a {
  font-weight: 600;
}

#uploaded_percentage {
  font-size: 2em;
  font-weight: 700;
  color: var(--blau);
}

#upload_finished a:hover,
#uploading a:hover,
#upload_finished a:focus,
#uploading a:focus {
  color: var(--teal-dunkel);
  text-decoration: underline;
}

.message,
.error {
  color: var(--rot);
  font-style: normal;
  font-weight: 600;
}

.info {
  color: var(--teal-dunkel);
}

#upload_link_email {
  margin-left: 10px;
}

#upload_image_email {
  padding-left: 22px;
  padding-bottom: 15px;
  background: url(email.svg) no-repeat left center;
  background-size: 16px 16px;
}

/* ==========================================================================
   5 = Nutzungsbedingungen
   ========================================================================== */

body > #content > div:only-of-type {
  background: var(--glas);
  border: 1px solid var(--glas-kante);
  margin: 0 auto 2em;
  padding: 2em 3em;
  text-align: center;
  border-radius: 16px;
  box-shadow: var(--karte);
  max-width: 460px;
  line-height: 1.65;
}

body > #content > div:only-of-type a {
  color: var(--blau);
  font-weight: 600;
}

body > #content > div:only-of-type a:hover {
  color: var(--teal-dunkel);
}

body > #content > div:only-of-type p {
  margin: 0.5em 0;
}

textarea[readonly="readonly"] {
  border: 1px solid var(--glas-kante);
  color: var(--tinte);
  font-family: var(--lauf);
  font-size: 1em;
  background: var(--glas);
  margin: 0 auto;
  padding: 2em;
  display: block;
  text-align: center;
  border-radius: 16px;
  box-shadow: var(--karte);
  max-width: 500px;
  line-height: 1.8;
}

textarea[readonly="readonly"] + p,
textarea[readonly="readonly"] + p + p {
  text-align: center;
  color: var(--grau);
  margin-top: 1em;
}

textarea[readonly="readonly"] + p a,
textarea[readonly="readonly"] + p + p a {
  font-weight: 600;
  text-decoration: none;
  color: var(--blau);
}

textarea[readonly="readonly"] + p a:hover,
textarea[readonly="readonly"] + p + p a:hover,
textarea[readonly="readonly"] + p a:focus,
textarea[readonly="readonly"] + p + p a:focus {
  color: var(--teal-dunkel);
  text-decoration: underline;
}

/* ==========================================================================
   6 = Installation
   ========================================================================== */

#install fieldset,
#install + fieldset {
  width: auto;
  max-width: 50em;
}

#install table,
#install + fieldset table {
  width: 100%;
  border-collapse: collapse;
}

#install td,
#install + fieldset td {
  padding: 0.55em 1em;
  border-bottom: 0;
}

#install td:empty {
  width: 13.1em;
}

#install table form:nth-child(odd),
#install + fieldset tr:nth-child(odd) {
  background: var(--zebra);
}

#install fieldset > form {
  margin-top: 2em;
  text-align: center;
}

#install form {
  display: table;
  width: 100%;
}

#install td:last-child { text-align: left; }

#install .info { width: 19em; }

#install input[type="submit"] {
  min-width: 10.5em;
}

#install + fieldset table {
  font-size: 0.9em;
}

#install + fieldset td:first-child input[type="submit"] {
  background: none;
  padding: 0;
  color: var(--blau);
  font-weight: 600;
  border-radius: 0;
}

#install + fieldset td:first-child input[type="submit"]:hover,
#install + fieldset td:first-child input[type="submit"]:focus {
  filter: none;
  color: var(--teal-dunkel);
  text-decoration: underline;
}

/* ==========================================================================
   7 = Verwaltung
   ========================================================================== */

#admin fieldset,
#admin + fieldset {
  width: auto;
  max-width: 60em;
}

#admin table,
#admin + fieldset table {
  width: 100%;
  border-collapse: collapse;
  border: none;
}

#admin td,
#admin + fieldset td {
  padding: 0.55em 1em;
  border: none;
}

#admin td:empty {
  width: 13.1em;
}

#admin table form:nth-child(odd),
#admin + fieldset tr:nth-child(odd) {
  background: var(--zebra);
}

#admin fieldset > form {
  margin-top: 2em;
  text-align: center;
}

#admin form {
  display: table;
  width: 100%;
}

#admin td:last-child { text-align: left; }

#admin .info { width: 19em; }

#admin input[type="submit"] {
  min-width: 10.5em;
}

#admin + fieldset table {
  font-size: 0.9em;
}

#admin + fieldset td:first-child input[type="submit"] {
  background: none;
  padding: 0;
  color: var(--blau);
  font-weight: 600;
  border-radius: 0;
}

#admin + fieldset td:first-child input[type="submit"]:hover,
#admin + fieldset td:first-child input[type="submit"]:focus {
  filter: none;
  color: var(--teal-dunkel);
  text-decoration: underline;
}

/* ==========================================================================
   8 = Downloadseite
   ========================================================================== */

#self_destruct {
  font-weight: 600;
  color: var(--rot);
  background-image: url('self-destruct.svg');
  background-size: 32px 32px;
  background-repeat: no-repeat;
  background-position: left center;
  padding-left: 42px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ==========================================================================
   9 = Bundle (Mehrdateien-Upload/-Download)
   ========================================================================== */

.upload-mode-toggle {
  display: flex;
  justify-content: center;
  gap: 1.5em;
  margin-bottom: 1em;
  padding: 0.8em;
  background: rgb(37 99 235 / 0.05);
  border-radius: 10px;
}

.upload-mode-toggle label {
  display: flex;
  align-items: center;
  gap: 0.4em;
  cursor: pointer;
  color: var(--tinte);
  font-size: 0.95em;
}

.upload-mode-toggle input[type="radio"] {
  accent-color: var(--blau);
}

.bundle-file-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: 0.5em;
  margin: 1em 0;
  background: #fff;
  text-align: left;
}

.bundle-file-list .bundle-file-item {
  display: flex;
  justify-content: space-between;
  padding: 0.35em 0.5em;
  border-bottom: 1px solid var(--linie);
  font-size: 0.9em;
}

.bundle-file-list .bundle-file-item:last-child {
  border-bottom: none;
}

.bundle-file-list .file-name {
  color: var(--tinte);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.bundle-file-list .file-size {
  color: var(--grau);
  white-space: nowrap;
}

.bundle-total-size {
  text-align: center;
  font-weight: 600;
  color: var(--tinte);
  margin: 0.5em 0;
}

#bundle_upload_finished {
  text-align: center;
  padding-left: 3em;
}

#bundle_upload_finished fieldset {
  text-align: left;
}

#bundle_upload_finished h3 {
  color: var(--tinte);
  margin: 1em 0 0.3em;
  font-size: 1em;
  font-weight: 650;
}

#bundle_upload_finished a {
  color: var(--blau);
  text-decoration: none;
  word-break: break-all;
}

#bundle_upload_finished a:hover {
  color: var(--teal-dunkel);
  text-decoration: underline;
}

.copy_button {
  background: linear-gradient(90deg, var(--blau), var(--teal));
  border: none;
  color: #fff;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9em;
  font-family: inherit;
  font-weight: 600;
  margin-left: 0.5em;
  transition: filter .18s;
}

.copy_button:hover {
  filter: brightness(1.08);
}

.bundle-container {
  background: var(--glas);
  border: 1px solid var(--glas-kante);
  border-radius: 16px;
  max-width: 50em;
  margin: 0 auto;
  padding: 2em;
  box-shadow: var(--karte);
}

.bundle-header {
  text-align: center;
  margin-bottom: 1.5em;
  padding-bottom: 1em;
  border-bottom: 1px solid var(--linie);
}

.bundle-title {
  color: var(--tinte);
  margin: 0 0 0.5em;
  font-size: 1.5em;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.bundle-meta {
  color: var(--grau);
  font-size: 0.95em;
}

.bundle-files {
  margin-bottom: 1.5em;
}

table.bundle-file-list {
  width: 100%;
  border-collapse: collapse;
  border: none;
}

table.bundle-file-list thead {
  background: rgb(37 99 235 / 0.06);
}

table.bundle-file-list th {
  padding: 0.8em 1em;
  text-align: left;
  color: var(--tinte);
  font-weight: 650;
  border: none;
}

table.bundle-file-list td {
  padding: 0.8em 1em;
  border-bottom: 1px solid var(--linie);
}

table.bundle-file-list tbody tr:hover {
  background: rgb(37 99 235 / 0.03);
}

.bundle-file-row {
  cursor: pointer;
}

.bundle-file-name {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.bundle-file-name .file-icon {
  font-size: 1.2em;
}

.bundle-file-size {
  color: var(--grau);
  white-space: nowrap;
}

.bundle-file-action {
  text-align: right;
}

.btn-download {
  display: inline-block;
  background: linear-gradient(90deg, var(--blau), var(--teal));
  color: #fff;
  padding: 0.45em 1.1em;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 600;
  transition: filter .18s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-download:hover {
  filter: brightness(1.08);
  color: #fff;
}

input.btn-download {
  padding: 0.5em 1.2em;
}

.btn-download-all {
  display: block;
  width: 100%;
  background: linear-gradient(90deg, var(--blau), var(--teal));
  color: #fff;
  padding: 1em 2em;
  border: none;
  border-radius: 999px;
  font-size: 1.05em;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter .18s;
}

.btn-download-all:hover {
  filter: brightness(1.08);
}

.btn-download-all:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  filter: none;
}

.bundle-actions {
  text-align: center;
  padding-top: 1em;
  border-top: 1px solid var(--linie);
}

.download-progress {
  margin-top: 1em;
  color: var(--grau);
}
