
/* Fonts — Poppins + Amatic (bundled from derauer.at / BeTheme webfonts, served locally) */
@font-face {
  font-family: "Poppins-Regular";
  src: url("poppins-regular-webfont.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins-Medium";
  src: url("poppins-medium-webfont.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Amatic-SC-Bold";
  src: url("amaticsc-bold-webfont.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Summary

   1 = Basic Style
   2 = Copyright
   3 = Options
   4 = Upload
   5 = Terms of service
   6 = Install
   7 = Admin
   8 = Download page

   ========================================================================== */

:root {
  /* derauer.at / Auer CI */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #000000;
  --color-muted: #8c8c8c;
  --color-accent: #cc0000;
  --color-accent-hover: #d30010;
  --color-accent-dark: #990000;
  --color-input-border: #ebebeb;
  --color-input-focus-bg: #e9f5fc;
  --color-input-focus-border: #d5e5ee;
  --color-border: #e0e0e0;
  --color-border-strong: #c0c1c3;
  --color-danger: #962317;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --font-body: "Poppins-Regular", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Poppins-Medium", "Poppins-Regular", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Amatic-SC-Bold", "Poppins-Medium", cursive, sans-serif;
  --content-max: 1220px;
}

/* ==========================================================================
   1 = Basic Style
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background: var(--color-accent);
  color: #fff;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 28px;
  font-weight: 400;
  margin: 0;
  min-height: 100vh;
}

#content {
  padding: 1.25rem clamp(1rem, 4vw, 2rem) 3rem;
  max-width: var(--content-max);
  margin: 0 auto;
}

h1 {
  margin: 0 0 0.35rem;
}

/* Logo — same asset as in derauer.at media library */
h1 a {
  display: block;
  background: url(https://derauer.at/wp-content/uploads/2017/01/Auer-Logo.jpg)
    no-repeat center;
  background-size: contain;
  text-indent: -9999px;
  width: min(250px, 92vw);
  aspect-ratio: 536 / 152;
  height: auto;
  max-height: 152px;
  margin: 0.75rem auto 0.35rem;
  filter: drop-shadow(var(--shadow-sm));
  transition: opacity 0.2s ease;
}

h1 a:hover,
h1 a:focus {
  opacity: 0.92;
}

h2 {
  font-family: var(--font-heading);
  text-align: center;
  color: var(--color-text);
  font-weight: 500;
  font-size: 30px;
  line-height: 33px;
  letter-spacing: 0;
  margin: 0.35rem 0 1.25rem;
}

fieldset {
  border: 0;
  padding: 1.5rem 1.75rem 2rem;
  margin: 0 auto;
  border-radius: var(--radius);
  width: 20em;
  border: 1px solid var(--color-input-border);
  min-height: 15em;
  min-width: min(30em, 100%);
  position: relative;
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

legend {
  font-family: var(--font-display);
  padding: 0.25rem 0.85rem;
  background: var(--color-surface);
  color: var(--color-accent);
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 700;
  display: block;
  min-width: 8em;
  text-align: center;
  border-radius: var(--radius-sm);
}

table a {
  color: var(--color-text);
}

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

input[type="submit"] {
  font-family: var(--font-body);
  background: #e0081d;
  border: 0;
  padding: 16px 20px;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.2;
  color: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  margin: 10px;
  box-shadow: none;
  transition: background 0.2s ease, transform 0.1s ease;
}

select,
input[type="text"],
input[type="password"] {
  font-family: var(--font-body);
  color: #626262;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  font-size: 19px;
  line-height: 1.35;
  background: rgba(255, 255, 255, 1);
  width: 100%;
  max-width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

select:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  color: #000;
  background: var(--color-input-focus-bg) !important;
  border-color: var(--color-input-focus-border);
  box-shadow: none;
}

select {
  width: 100%;
  cursor: pointer;
}

input[type="submit"]:hover,
input[type="submit"]:focus {
  background: var(--color-accent-hover);
  outline: none;
}

input[type="submit"]:active {
  transform: translateY(1px);
}

.inner {
  margin-top: 2.5rem;
}

#upload fieldset {
  background-color: #fafafa;
  /* Eine Dimension + auto: Seitenverhältnis bleibt (50%×50% war verzerrend). */
  background-image: url(upload.svg);
  background-repeat: no-repeat;
  background-position: center 38%;
  background-size: min(200px, 42vw) auto;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#upload fieldset:hover {
  border-color: rgba(204, 0, 0, 0.35);
  box-shadow: var(--shadow), 0 0 0 1px rgba(204, 0, 0, 0.08);
}

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

#upload p {
  margin: 0;
}

#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 = Copyright
   ========================================================================== */

#copyright {
  text-align: center;
  font-size: 15px;
  line-height: 22px;
  color: var(--color-muted);
  margin: 3rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-input-border);
}

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

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

/* ==========================================================================
   3 = Options
   ========================================================================== */

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

#options tr {
  height: 2.7em;
}

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

#option_table td:first-child {
  font-family: var(--font-body);
  text-align: left;
  padding-right: 0.75rem;
  white-space: nowrap;
  color: var(--color-muted);
  font-size: 17px;
}

#option_table td:last-child {
  width: 60%;
}

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

.config {
  color: var(--color-muted);
  font-size: 16px;
  line-height: 24px;
  margin: 0.5rem 0 0;
}

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

#upload_finished,
#uploading,
.message,
.info,
.error {
  text-align: center;
  color: var(--color-muted);
  padding-left: 0;
  padding-right: 0;
}

#upload_finished > p:nth-child(1) {
  font-family: var(--font-heading);
  color: var(--color-accent);
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
}

#upload_finished div p:nth-child(1) {
  font-weight: 500;
  color: var(--color-text);
}

#upload_finished a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}

#uploading a {
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
}

#uploaded_percentage {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: -0.03em;
}

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

#upload_finished code,
#uploading code {
  display: inline-block;
  margin: 0.35rem 0;
  padding: 0.5rem 0.75rem;
  background: #fafafa;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-all;
  max-width: 100%;
  border: 1px solid var(--color-input-border);
  color: #626262;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
}

#upload_finished button,
#uploading button {
  vertical-align: middle;
  margin-left: 0.35rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--color-accent);
  transition: background 0.15s ease, border-color 0.15s ease;
}

#upload_finished button:hover,
#upload_finished button:focus,
#uploading button:hover,
#uploading button:focus {
  background: #fff5f5;
  border-color: rgba(204, 0, 0, 0.4);
  outline: none;
}

.message,
.error {
  color: var(--color-danger);
  font-style: normal;
  font-weight: 500;
  padding: 0.85rem 1.1rem;
  background: #fae9e8;
  border-radius: var(--radius);
  border: 1px solid #e8c4c0;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 17px;
  line-height: 24px;
}

#upload_link_email {
  margin-left: 10px;
}

#upload_image_email {
  padding-left: 20px;
  padding-bottom: 15px;
  background: url(email.png) no-repeat;
}

/* ==========================================================================
   5 = Terms of service
   ========================================================================== */

textarea[readonly="readonly"] {
  border: 0;
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 28px;
  background: none;
  margin: auto;
  display: block;
}

textarea[readonly="readonly"] + p,
textarea[readonly="readonly"] + p + p {
  text-align: center;
  color: var(--color-muted);
}

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

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(--color-accent);
  text-decoration: underline;
}

/* ==========================================================================
   6 = Install
   ========================================================================== */

#install fieldset,
#install + fieldset {
  width: auto;
  max-width: 50em;
  border: 1px solid var(--color-input-border);
}

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

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

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

#install table form:nth-child(odd),
#install + fieldset tr:nth-child(odd) {
  background: rgba(204, 0, 0, 0.05);
}

#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(--color-text);
  font-weight: 600;
  border-bottom: 0;
  font-size: inherit;
}

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

/* ==========================================================================
   7 = Admin
   ========================================================================== */

#admin fieldset,
#admin + fieldset {
  width: auto;
  max-width: 60em;
  border: 1px solid var(--color-input-border);
}

#admin table,
#admin + fieldset table {
  width: 100%;
  border-collapse: collapse;
  border-bottom: 2px solid var(--color-surface);
}

#admin td,
#admin + fieldset td {
  padding: 0.5em 1em;
  border: 2px solid var(--color-surface);
  border-bottom: 0;
}

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

#admin table form:nth-child(odd),
#admin + fieldset tr:nth-child(odd) {
  background: rgba(204, 0, 0, 0.05);
}

#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(--color-text);
  font-weight: 600;
  border-bottom: 0;
  font-size: inherit;
}

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

/* ==========================================================================
   8 = Download page
   ========================================================================== */

#self_destruct {
  font-weight: 600;
  color: var(--color-accent);
  background-image: url("pixel_bomb.png");
  background-size: 40px 40px;
  background-repeat: no-repeat;
  padding-left: 40px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.form.logout input[type="submit"] {
  background: transparent;
  color: var(--color-muted);
  border: 1px solid var(--color-input-border);
  font-weight: 400;
  box-shadow: none;
}

.form.logout input[type="submit"]:hover,
.form.logout input[type="submit"]:focus {
  background: #fafafa;
  color: var(--color-text);
  border-color: var(--color-border-strong);
  box-shadow: none;
}
