/*
 * Redaktionsoberfläche: Startseite, Statuschips und Anmeldeseite.
 *
 * Die Farben sind die Marken-Token der Website (Petrol, Kupfer, Papier), damit
 * Backend und öffentliche Seite nicht wie zwei Produkte wirken. Bewusst
 * zurückhaltend: WordPress' eigene Listen, Formulare und Fokusringe bleiben
 * unangetastet, nur die eigenen Bausteine bekommen eine Gestaltung.
 */

:root {
  --a1-petrol: #003f5c;
  --a1-petrol-deep: #002a3e;
  --a1-kupfer: #c65d00;
  --a1-kupfer-text: #a34c00;
  --a1-anthrazit: #1c1c1c;
  --a1-paper: #f3f1ec;
  --a1-border: #d8d3c5;
  --a1-login-shell: #062b3a;
}

/* ===== Mediathek: fachlicher Ordnerbaum ohne Lizenzwerbung ===== */

body.upload-php .mlo-pro-admin-notice,
body.upload-php .mlo-button-secondary.is-pro-locked {
  display: none !important;
}

body.upload-php .tree-view-sidebar .sidebar-heading {
  border-bottom-color: var(--a1-border);
}

body.upload-php .tree-view-sidebar .sidebar-title {
  color: var(--a1-anthrazit);
}

body.upload-php .tree-view-sidebar .mlo-button-primary {
  border-color: var(--a1-kupfer);
  background: var(--a1-kupfer);
}

body.upload-php .tree-view-sidebar .mlo-button-primary:hover,
body.upload-php .tree-view-sidebar .mlo-button-primary:focus {
  border-color: #a34c00;
  background: #a34c00;
}

@media (min-width: 783px) {
  body.upload-php #adminmenuwrap {
    position: fixed;
    top: 32px;
    bottom: 0;
    overflow-y: auto;
  }

  body.upload-php .media-library-organizer-tree-view {
    align-items: flex-start;
  }

  body.upload-php #media-library-organizer-tree-view {
    position: sticky !important;
    z-index: 20;
    top: 32px !important;
    align-self: flex-start;
    height: auto !important;
    max-height: calc(100vh - 32px);
  }

  body.upload-php .tree-view-sidebar {
    max-height: calc(100vh - 32px);
  }
}

/* ===== Startseite ===== */

.a1-start {
  max-width: 1180px;
}

.a1-start h1 {
  margin-bottom: 4px;
  font-size: 26px;
  color: var(--a1-anthrazit);
}

.a1-start-lead {
  margin: 0 0 24px;
  font-size: 15px;
  color: #50575e;
}

.a1-start-heading {
  margin: 32px 0 12px;
  font-size: 16px;
  color: var(--a1-anthrazit);
}

.a1-start-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.a1-start-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px 22px;
  border: 1px solid var(--a1-border);
  border-left: 4px solid var(--a1-border);
  border-radius: 6px;
  background: #fff;
  color: var(--a1-anthrazit);
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.a1-start-stat:hover,
.a1-start-stat:focus {
  box-shadow: 0 2px 10px rgba(0, 63, 92, 0.12);
  transform: translateY(-1px);
  color: var(--a1-anthrazit);
}

.a1-start-stat strong {
  font-size: 34px;
  line-height: 1.1;
  font-weight: 600;
}

.a1-start-stat span {
  font-size: 13px;
  color: #50575e;
}

.a1-start-stat[data-tone='attention'] {
  border-left-color: var(--a1-kupfer);
}

.a1-start-stat[data-tone='attention'] strong {
  color: var(--a1-kupfer-text);
}

.a1-start-stat[data-tone='draft'] {
  border-left-color: #b8a44a;
}

.a1-start-stat[data-tone='available'] {
  border-left-color: #2e7d47;
}

.a1-start-stat[data-tone='available'] strong {
  color: #1e6135;
}

.a1-start-stat[data-tone='quiet'] strong {
  color: #8c8f94;
}

/* ===== Panels: Anfragen und Entwürfe ===== */

.a1-start-columns {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  /* Ohne `start` zieht das Raster die kürzere Spalte auf die Höhe der
     längeren und erzeugt eine große leere Fläche. */
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.a1-start-panel {
  padding: 4px 22px 18px;
  border: 1px solid var(--a1-border);
  border-radius: 6px;
  background: #fff;
}

.a1-start-panel h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #50575e;
}

.a1-start-panel ul {
  margin: 0;
}

.a1-start-panel li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 10px 0;
  border-top: 1px solid #f0f0f1;
  margin: 0;
}

.a1-start-panel li a {
  font-weight: 600;
  text-decoration: none;
}

.a1-start-panel li small {
  grid-column: 1 / -1;
  color: #646970;
}

.a1-start-more {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* ===== Einstiegskacheln ===== */

.a1-start-tiles {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.a1-start-tile {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 12px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--a1-border);
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  color: var(--a1-anthrazit);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.a1-start-tile:hover,
.a1-start-tile:focus {
  border-color: var(--a1-petrol);
  box-shadow: 0 2px 10px rgba(0, 63, 92, 0.12);
  color: var(--a1-anthrazit);
}

.a1-start-tile .dashicons {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  font-size: 28px;
  color: var(--a1-petrol);
}

.a1-start-tile strong {
  font-size: 15px;
}

.a1-start-tile span:last-child {
  font-size: 13px;
  color: #646970;
}

/* ===== Statuschips (Startseite und Listen) ===== */

.a1-status-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.7;
  white-space: nowrap;
  background: #f0f0f1;
  color: #3c434a;
}

.a1-status-chip[data-status='new'] {
  background: #fbe7d3;
  color: #8a4100;
}

.a1-status-chip[data-status='in_review'] {
  background: #dce8ef;
  color: var(--a1-petrol-deep);
}

.a1-status-chip[data-status='replied'] {
  background: #dff0e3;
  color: #1e6135;
}

.a1-status-chip[data-status='draft'] {
  background: #f6efd6;
  color: #6b5a12;
}

.a1-status-chip[data-status='failed'] {
  background: #fbdada;
  color: #8a1f1f;
}

/* ===== Website-Einstellungen ===== */

/* WordPress' `small-text` ist auf zweistellige Zahlen ausgelegt und schneidet
   eine fünfstellige Postleitzahl ab. */
#a1_zip {
  width: 6em;
}

/* ===== Anmeldeseite ===== */

body.login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  box-sizing: border-box;
  padding: 40px 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--a1-login-shell);
  background-size: 88px 88px;
  color: var(--a1-anthrazit);
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.login * {
  box-sizing: border-box;
}

body.login #login {
  width: min(420px, calc(100% - 40px));
  padding: 0;
}

body.login h1 a {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 24px;
  padding: 0;
  background: none;
  box-shadow: none;
  text-indent: 0;
  font: inherit;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #fff;
}

body.login h1 a::after {
  display: block;
  margin-top: 8px;
  content: 'Redaktion';
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e88937;
}

body.login #login form {
  margin-top: 0;
  padding: 30px;
  border: 1px solid var(--a1-border);
  border-top: 4px solid var(--a1-kupfer);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 18, 27, 0.3);
}

body.login label {
  color: #45484b;
  font-size: 14px;
  font-weight: 600;
}

body.login form .input,
body.login input[type='text'] {
  min-height: 48px;
  margin: 7px 0 20px;
  padding: 8px 12px;
  border: 1px solid #aaa79e;
  border-radius: 2px;
  box-shadow: none;
  color: var(--a1-anthrazit);
  font-size: 16px;
  line-height: 1.4;
}

body.login form .input:focus,
body.login input[type='text']:focus {
  border-color: var(--a1-kupfer);
  box-shadow: 0 0 0 2px rgba(198, 93, 0, 0.18);
}

body.login .wp-pwd button {
  color: var(--a1-petrol);
}

body.login .forgetmenot {
  display: flex;
  min-height: 42px;
  align-items: center;
}

body.login .forgetmenot label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
}

body.login .forgetmenot input[type='checkbox'] {
  margin: 0;
  border-color: #8d8a82;
  border-radius: 2px;
}

body.login .button-primary {
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--a1-kupfer);
  border-radius: 2px;
  background: var(--a1-kupfer);
  box-shadow: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-shadow: none;
}

body.login .button-primary:hover,
body.login .button-primary:focus {
  border-color: #a34c00;
  background: #a34c00;
  box-shadow: 0 0 0 2px rgba(232, 137, 55, 0.3);
  color: #fff;
}

body.login .message,
body.login #login_error,
body.login .success {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 0;
  border-left: 4px solid var(--a1-kupfer);
  background: #fff;
  box-shadow: none;
  color: #35383b;
  font-size: 13px;
  line-height: 1.5;
}

body.login #login_error {
  border-left-color: #cc2936;
}

body.login #nav,
body.login #backtoblog {
  margin: 18px 0 0;
  padding: 0;
  text-align: center;
}

body.login #nav a,
body.login #backtoblog a,
body.login .privacy-policy-page-link a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  text-decoration: none;
}

body.login #nav a:hover,
body.login #nav a:focus,
body.login #backtoblog a:hover,
body.login #backtoblog a:focus,
body.login .privacy-policy-page-link a:hover,
body.login .privacy-policy-page-link a:focus {
  color: #fff;
}

body.login .privacy-policy-page-link {
  margin: 18px 0 0;
}

@media (max-width: 480px) {
  body.login {
    padding: 28px 0;
  }

  body.login #login {
    width: min(420px, calc(100% - 28px));
  }

  body.login #login form {
    padding: 24px 22px;
  }

  body.login h1 a {
    font-size: 24px;
  }
}
