/*
 * Theme Name:  Raaby & Rosendal AI Portal
 * Theme URI:   https://autom8.dk
 * Description: Custom child theme til Raaby & Rosendal's interne AI-assistent portal på rr.autom8.dk. Bygget på Twenty Twenty-Five.
 * Author:      Autom8
 * Author URI:  https://autom8.dk
 * Template:    twentytwentyfive
 * Version:     1.0.6
 * License:     GPLv2 or later
 * Text Domain: rr-theme
 */

/* ============================================================
   DESIGN TOKENS – Raaby & Rosendal brand
   ============================================================ */
:root {
  /* Farver */
  --rr-teal:        #009fac;
  --rr-teal-dark:   #26565a;
  --rr-teal-light:  #e0f5f7;
  --rr-navy:        #0F172A;
  --rr-navy-mid:    #1e293b;
  --rr-warm-light:  #edede8;
  --rr-text:        #474747;
  --rr-text-muted:  #6b7280;
  --rr-white:       #ffffff;
  --rr-border:      #d1d5db;

  /* Typografi */
  --rr-font-heading: 'Bebas Neue', 'Impact', sans-serif;
  --rr-font-body:    'Montserrat', 'Segoe UI', sans-serif;

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

/* ============================================================
   GOOGLE FONTS IMPORT
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@400;500;600;700&display=swap');

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--rr-font-body) !important;
  color: var(--rr-text) !important;
  background-color: var(--rr-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
   ============================================================ */
.rr-header {
  background: var(--rr-navy);
  border-bottom: 3px solid var(--rr-teal);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.rr-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.rr-header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

/* CSS-tekstlogo – R&R wordmark */
.rr-header__logo-wordmark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rr-logo-rr {
  font-family: var(--rr-font-heading);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--rr-white);
  line-height: 1;
  white-space: nowrap;
}

.rr-logo-amp {
  color: var(--rr-teal);
  margin: 0 1px;
}

.rr-header__logo-text {
  font-family: var(--rr-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  line-height: 1.2;
}

.rr-header__logo-text span {
  display: block;
  color: var(--rr-teal);
  font-size: 10px;
}

.rr-header__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.rr-header__nav-group,
.rr-header__user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rr-header__nav a {
  font-family: var(--rr-font-body);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--rr-radius);
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

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

.rr-header__tool-link {
  color: var(--rr-teal) !important;
  border: 1px solid rgba(0, 159, 172, 0.35);
  background: rgba(0, 159, 172, 0.08);
}

.rr-header__tool-link:hover {
  background: rgba(0, 159, 172, 0.16) !important;
}

.rr-header__user {
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,0.08);
}

.rr-header__user-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.rr-header__logout {
  font-size: 12px;
  color: rgba(255,255,255,0.4) !important;
  text-decoration: none;
  transition: color 0.2s;
}

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

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

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.rr-main {
  min-height: calc(100vh - 68px - 80px);
  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
   ============================================================ */
.rr-footer {
  background: var(--rr-navy);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 20px 24px;
}

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

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

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

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

.rr-footer__right a {
  color: var(--rr-teal);
  text-decoration: none;
}

/* ============================================================
   LOGIN SIDE
   ============================================================ */
body.login {
  background: var(--rr-navy) !important;
  font-family: var(--rr-font-body) !important;
}

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

body.login h1 a {
  background-image: url('../rr-theme/assets/img/rr-logo.webp') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  width: 200px !important;
  height: 60px !important;
  filter: brightness(0) invert(1);
}

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

body.login label {
  color: rgba(255,255,255,0.7) !important;
  font-family: var(--rr-font-body) !important;
  font-size: 13px !important;
  font-weight: 600 !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(--rr-radius) !important;
  color: var(--rr-white) !important;
  font-family: var(--rr-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(--rr-teal) !important;
  box-shadow: 0 0 0 2px rgba(0,159,172,0.25) !important;
  outline: none !important;
}

body.login input[type="submit"] {
  background: var(--rr-teal) !important;
  border: none !important;
  border-radius: var(--rr-radius) !important;
  color: var(--rr-white) !important;
  font-family: var(--rr-font-body) !important;
  font-size: 14px !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(--rr-teal-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: var(--rr-teal) !important;
}

body.login .message,
body.login .success {
  background: rgba(0,159,172,0.15) !important;
  border-left: 4px solid var(--rr-teal) !important;
  color: rgba(255,255,255,0.8) !important;
  border-radius: 0 var(--rr-radius) var(--rr-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(--rr-radius) var(--rr-radius) 0 !important;
}

/* Login-side tagline under logo */
#login_header_text {
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

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

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

.rr-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;
}

.rr-access-denied__title {
  font-family: var(--rr-font-heading);
  font-size: 32px;
  letter-spacing: 0.04em;
  color: var(--rr-white);
  margin: 0 0 12px;
}

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

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

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

/* ============================================================
   UTILITY KLASSER
   ============================================================ */
.rr-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.rr-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;
}

/* Projects Page Layout */
.rr-projects-page {
    padding-top: 30px;
    padding-bottom: 30px;
}

.rr-projects-layout {
    display: flex;
    gap: 30px;
}

.rr-projects-sidebar {
    flex: 0 0 250px; /* Fixed width for sidebar */
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
}

.rr-projects-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rr-projects-nav li {
    margin-bottom: 10px;
}

.rr-projects-nav a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.rr-projects-nav a:hover,
.rr-projects-nav a.active {
    background-color: #e0e0e0;
    color: #000;
}

.rr-projects-main-content {
    flex-grow: 1;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Projects Page Layout */
.rr-projects-page {
    padding-top: 30px;
    padding-bottom: 30px;
}

.rr-projects-layout {
    display: flex;
    gap: 30px;
}

.rr-projects-sidebar {
    flex: 0 0 250px; /* Fixed width for sidebar */
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
}

.rr-projects-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rr-projects-nav li {
    margin-bottom: 10px;
}

.rr-projects-nav a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.rr-projects-nav a:hover,
.rr-projects-nav a.active {
    background-color: #e0e0e0;
    color: #000;
}

.rr-projects-main-content {
    flex-grow: 1;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
