/* Public pages of the E-Rechnung form. Colours, fonts and sizes come from tokens.css, which is the
   file of the intranet; the controls below follow the intranet's base.css. */
* {
  box-sizing:border-box
}

html,body {
  margin:0;
  min-height:100%;
  font:var(--font-body)/1.4 var(--font);
  color:var(--text);
  background:var(--content-bg)
}

body {
  display:flex;
  flex-direction:column;
  min-height:100vh
}

[hidden] {
  display:none!important
}

.skip-link {
  position:fixed;
  top:-100px;
  left:12px;
  padding:12px;
  z-index:3000;
  background:var(--surface-solid)
}

.skip-link:focus {
  top:8px
}

button,input {
  font:inherit;
  color:inherit
}

button {
  cursor:pointer;
  min-height:var(--control-height)
}

button:disabled {
  opacity:.65;
  cursor:not-allowed
}

button,a,input {
  touch-action:manipulation
}

:focus-visible {
  outline:3px solid var(--focus);
  outline-offset:2px
}

a {
  color:var(--link)
}

h1,h2,h3,p {
  margin:0
}

h1 {
  font-size:var(--font-title);
  letter-spacing:-.45px;
  line-height:1.15;
  margin-bottom:10px
}

h2 {
  font-size:var(--font-section);
  margin-bottom:14px
}

h3 {
  font-size:16px;
  margin:12px 0 4px
}

p {
  line-height:1.5
}

/* Top bar as in the intranet: white, logo on its plate; the brand red runs below it. */
.topbar {
  flex:none;
  display:flex;
  align-items:center;
  gap:12px;
  height:60px;
  padding-right:18px;
  border-bottom:1px solid var(--line);
  background:var(--shell-bg)
}

.topbar-logo {
  display:grid;
  place-items:center;
  width:76px;
  align-self:stretch;
  flex:none;
  background:#fff
}

.topbar-logo img {
  width:60px;
  height:40px;
  object-fit:contain
}

.topbar-title {
  font-weight:700;
  color:var(--muted)
}

.brand-line {
  flex:none;
  height:6px;
  background:linear-gradient(90deg,#d6131f,#b50b16)
}

main {
  flex:1;
  width:100%;
  max-width:720px;
  margin:0 auto;
  padding:28px 16px 40px
}

.lead {
  margin-bottom:20px;
  color:var(--muted)
}

.footer {
  flex:none;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:6px 20px;
  padding:16px;
  border-top:1px solid var(--line);
  background:var(--shell-bg);
  font-size:var(--font-small);
  color:var(--muted)
}

.btn {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:7px;
  min-height:40px;
  border:1px solid var(--brand);
  border-radius:6px;
  padding:8px 14px;
  background:var(--brand);
  color:var(--on-brand);
  font-weight:700;
  font-size:14px;
  text-decoration:none;
  text-align:center
}

.btn:hover:not(:disabled) {
  background:var(--brand-hover)
}

.btn.secondary {
  background:var(--surface-raised);
  color:var(--text);
  border-color:var(--control-line)
}

.btn.secondary:hover:not(:disabled) {
  background:var(--control-hover)
}

.card {
  padding:20px;
  border:1px solid var(--card-line);
  border-radius:var(--radius-panel);
  background:var(--surface);
  box-shadow:var(--shadow-panel);
  min-width:0;
  margin-bottom:16px
}

.card>h2::after {
  content:'';
  display:block;
  width:22px;
  height:3px;
  margin-top:6px;
  border-radius:2px;
  background:var(--brand)
}

.form-actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin:14px 0
}

.field {
  margin-bottom:14px;
  min-width:0
}

.field>label {
  display:block;
  font-size:14px;
  font-weight:700;
  margin-bottom:6px
}

.field>.muted {
  margin-top:4px
}

.optional {
  font-weight:400;
  color:var(--muted)
}

input {
  width:100%;
  min-width:0;
  min-height:40px;
  border:1px solid var(--control-line);
  border-radius:6px;
  padding:8px 10px;
  background:var(--control-bg)
}

input[type=checkbox] {
  width:18px;
  min-height:18px;
  height:18px;
  margin:0;
  accent-color:var(--accent-text);
  flex:none
}

input[aria-invalid=true] {
  border-color:var(--error-line);
  background:var(--error-bg)
}

.field-error {
  margin-top:4px;
  font-size:var(--font-small);
  color:var(--error-text)
}

.plz-ort {
  display:grid;
  grid-template-columns:minmax(110px,1fr) 3fr;
  gap:12px
}

.robot-check {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px 14px;
  padding:12px;
  border:1px solid var(--control-line);
  border-radius:6px;
  background:var(--subtle)
}

.robot-check label {
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700
}

.muted {
  font-size:13px;
  color:var(--muted)
}

.card>.muted {
  margin-bottom:14px
}

.spaced {
  margin-top:12px
}

.message {
  font-size:13px;
  line-height:1.5;
  padding:9px 12px;
  border-radius:6px;
  background:var(--subtle);
  margin:8px 0;
  overflow-wrap:anywhere
}

.message.ok {
  color:var(--success-text);
  background:var(--success-bg)
}

.message.warn {
  color:var(--warning-text);
  background:var(--warning-bg)
}

.message.error {
  color:var(--error-text);
  background:var(--error-bg);
  border-left:3px solid var(--error-line)
}

.message.error::before {
  content:'⚠ '
}

.legal h2 {
  margin-top:22px
}

.legal h2:first-child {
  margin-top:0
}

.legal p+p {
  margin-top:10px
}

/* Open points of the legal texts; must not go live like this. */
.todo {
  background:var(--warning-bg);
  color:var(--warning-text);
  padding:0 3px
}

@media (max-width:480px) {
  .plz-ort {
    grid-template-columns:1fr
  }

  .form-actions .btn {
    width:100%
  }
}
