/*
 * Theme Name:  DMT AI Portal
 * Theme URI:   https://autom8.dk
 * Description: Custom child theme til DMT's interne AI-platform. Bygget på Twenty Twenty-Five. DMT navy blue branding (#1B4080). Roboto font som dmt.dk.
 * Author:      Autom8
 * Author URI:  https://autom8.dk
 * Template:    twentytwentyfive
 * Version:     1.3.1
 * License:     GPLv2 or later
 * Text Domain: dmt-theme
 */

/* ============================================================
   GOOGLE FONTS – Roboto (som dmt.dk)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* ============================================================
   DESIGN TOKENS – DMT brand
   Primærfarve: #1B4080 (DMT navy blue fra logo)
   Accent: #e9a476 (varm orange-beige fra dmt.dk CTA-knapper)
   Font: Roboto (som dmt.dk)
   ============================================================ */
:root {
  /* Primærfarver – DMT Navy Blue */
  --dmt-blue:         #1B4080;
  --dmt-blue-dark:    #132f60;
  --dmt-blue-mid:     #1e3a6e;
  --dmt-blue-light:   #e8eef7;
  --dmt-blue-accent:  #2a5298;

  /* Accent – varm orange-beige fra dmt.dk */
  --dmt-accent:       #e9a476;
  --dmt-accent-dark:  #d4885a;

  /* Neutrale farver */
  --dmt-navy:         #0F172A;
  --dmt-navy-mid:     #1e293b;
  --dmt-warm-light:   #f4f6f9;
  --dmt-text:         #1a2332;
  --dmt-text-muted:   #666666;
  --dmt-white:        #ffffff;
  --dmt-border:       #d1d5db;

  /* Typografi – Roboto som dmt.dk */
  --dmt-font-heading: 'Roboto', sans-serif;
  --dmt-font-body:    'Roboto', sans-serif;

  /* Spacing */
  --dmt-radius:      6px;
  --dmt-radius-lg:   12px;
  --dmt-shadow:      0 2px 12px rgba(0,0,0,0.08);
  --dmt-shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--dmt-font-body) !important;
  color: var(--dmt-text) !important;
  background-color: var(--dmt-warm-light) !important;
  margin: 0;
  padding: 0;
}

/* Skjul WordPress admin-bar på frontend for alle brugere */
#wpadminbar {
  display: none !important;
}

html.admin-bar {
  margin-top: 0 !important;
}

/* ============================================================
   HEADER
   Mørk navy baggrund med DMT-blå accent-linje i bunden.
   Logo: DMT-logoet (rundt, blåt) + "AI Platform" tekst.
   ============================================================ */
.dmt-header {
  background: var(--dmt-navy);
  border-bottom: 3px solid var(--dmt-blue);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.dmt-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo-område */
.dmt-header__logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

/* DMT-logo: vis det runde blå logo som det er – ingen filter */
.dmt-header__logo img {
  height: 42px;
  width: 42px;
  object-fit: contain;
  /* Logoet er allerede blåt på hvid/transparent baggrund – ingen invert */
  filter: none;
  border-radius: 50%;
}

.dmt-header__logo-text {
  font-family: var(--dmt-font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dmt-white);
  line-height: 1.3;
}

.dmt-header__logo-text span {
  display: block;
  color: rgba(255,255,255,0.45);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Navigation */
.dmt-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dmt-header__nav a {
  font-family: var(--dmt-font-body);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--dmt-radius);
  transition: all 0.18s ease;
  letter-spacing: 0.02em;
}

.dmt-header__nav a:hover {
  color: var(--dmt-white);
  background: rgba(255,255,255,0.08);
}

/* Aktiv side – fremhævet med DMT-blå */
.dmt-header__nav a.active {
  color: var(--dmt-white);
  background: var(--dmt-blue);
}

/* Bruger-sektion */
.dmt-header__user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.1);
}

.dmt-header__user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dmt-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--dmt-white);
  text-transform: uppercase;
  flex-shrink: 0;
}

.dmt-header__wp-admin {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.45) !important;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: var(--dmt-radius);
  border: 1px solid rgba(255,255,255,0.12);
  letter-spacing: 0.04em;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.dmt-header__wp-admin:hover {
  color: var(--dmt-white) !important;
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
}

/* Indstillinger-link for subscribers (samme stil som WP Admin) */
.dmt-header__settings {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.45) !important;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: var(--dmt-radius);
  border: 1px solid rgba(255,255,255,0.12);
  letter-spacing: 0.04em;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.dmt-header__settings:hover {
  color: var(--dmt-white) !important;
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
}

.dmt-header__logout {
  font-size: 12px;
  color: rgba(255,255,255,0.4) !important;
  text-decoration: none;
  transition: color 0.2s;
  padding: 4px 8px;
  border-radius: var(--dmt-radius);
}

.dmt-header__logout:hover {
  color: rgba(255,255,255,0.8) !important;
  background: rgba(255,255,255,0.06);
}

/* Brugernavn i header */
.dmt-header__user-name {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sprog-toggle knap */
.dmt-lang-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--dmt-radius);
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  line-height: 1;
}

.dmt-lang-toggle:hover {
  color: var(--dmt-white);
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.07);
}

.dmt-lang-toggle:focus-visible {
  outline: 2px solid rgba(255,255,255,0.4);
  outline-offset: 2px;
}

/* Mobil header */
@media (max-width: 640px) {
  .dmt-header__nav { display: none; }
  .dmt-header__logo-text { display: none; }
  .dmt-header__inner { padding: 0 16px; }
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.dmt-main {
  min-height: calc(100vh - 64px - 72px);
  padding: 0;
}

/* Fjern Twenty Twenty-Five's default padding/margin på site */
.wp-site-blocks,
.entry-content,
.wp-block-post-content {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
.dmt-footer {
  background: var(--dmt-navy);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 18px 28px;
}

.dmt-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dmt-footer__left {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  font-family: var(--dmt-font-body);
}

.dmt-footer__left strong {
  color: rgba(255,255,255,0.55);
}

.dmt-footer__right {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  font-family: var(--dmt-font-body);
}

.dmt-footer__right a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
}

/* ============================================================
   LOGIN SIDE
   Mørk navy baggrund, DMT-logo øverst, Roboto font.
   ============================================================ */
body.login {
  background: var(--dmt-navy) !important;
  font-family: var(--dmt-font-body) !important;
}

body.login #login {
  padding: 40px 0;
}

body.login h1 a {
  background-image: url('../dmt-theme/assets/img/dmt-logo.png') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  width: 80px !important;
  height: 80px !important;
  /* Logoet er blåt – vis det som det er på mørk baggrund */
  filter: none !important;
}

body.login #loginform,
body.login #lostpasswordform {
  background: var(--dmt-navy-mid) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: var(--dmt-radius-lg) !important;
  box-shadow: var(--dmt-shadow-lg) !important;
  padding: 32px !important;
}

body.login label {
  color: rgba(255,255,255,0.7) !important;
  font-family: var(--dmt-font-body) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

body.login input[type="text"],
body.login input[type="password"] {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: var(--dmt-radius) !important;
  color: var(--dmt-white) !important;
  font-family: var(--dmt-font-body) !important;
  font-size: 15px !important;
  padding: 12px 14px !important;
  transition: border-color 0.2s !important;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus {
  border-color: var(--dmt-blue) !important;
  box-shadow: 0 0 0 2px rgba(27,64,128,0.3) !important;
  outline: none !important;
}

body.login input[type="submit"] {
  background: var(--dmt-blue) !important;
  border: none !important;
  border-radius: var(--dmt-radius) !important;
  color: var(--dmt-white) !important;
  font-family: var(--dmt-font-body) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 13px 24px !important;
  width: 100% !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
}

body.login input[type="submit"]:hover {
  background: var(--dmt-blue-dark) !important;
}

body.login #nav a,
body.login #backtoblog a {
  color: rgba(255,255,255,0.4) !important;
  font-size: 12px !important;
}

body.login #nav a:hover,
body.login #backtoblog a:hover {
  color: rgba(255,255,255,0.7) !important;
}

body.login .message,
body.login .success {
  background: rgba(27,64,128,0.2) !important;
  border-left: 4px solid var(--dmt-blue) !important;
  color: rgba(255,255,255,0.8) !important;
  border-radius: 0 var(--dmt-radius) var(--dmt-radius) 0 !important;
}

body.login .login-action-login #login_error {
  background: rgba(239,68,68,0.15) !important;
  border-left: 4px solid #ef4444 !important;
  color: rgba(255,255,255,0.8) !important;
  border-radius: 0 var(--dmt-radius) var(--dmt-radius) 0 !important;
}

/* ============================================================
   ADGANG NÆGTET SIDE
   ============================================================ */
.dmt-access-denied {
  min-height: 100vh;
  background: var(--dmt-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  font-family: var(--dmt-font-body);
}

.dmt-access-denied__card {
  background: var(--dmt-navy-mid);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--dmt-radius-lg);
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--dmt-shadow-lg);
}

.dmt-access-denied__icon {
  width: 64px;
  height: 64px;
  background: rgba(239,68,68,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 28px;
}

.dmt-access-denied__title {
  font-family: var(--dmt-font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--dmt-white);
  margin: 0 0 12px;
}

.dmt-access-denied__text {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 32px;
}

.dmt-access-denied__btn {
  display: inline-block;
  background: var(--dmt-blue);
  color: var(--dmt-white) !important;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: var(--dmt-radius);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.2s;
}

.dmt-access-denied__btn:hover {
  background: var(--dmt-blue-dark) !important;
}

/* ============================================================
   UTILITY KLASSER
   ============================================================ */
.dmt-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

.dmt-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
