/*
Theme Name: KBS 2025
Theme URI: https://kbs.de
Author: KBS
Author URI: https://kbs.de
Description: One-Pager Business Theme auf Basis von Twenty Twenty-Five
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
Version: 1.0.0
Text Domain: kbs-2025
*/

/* ==========================================================
   STICKY HEADER – DEINE FUNKTIONIERENDE LÖSUNG
   ========================================================== */

/* Sticky-Killer neutralisieren (Block-Themes!) */
.wp-site-blocks {
  overflow: visible;
}

/* Header-Template-Part sticky */
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

/* Admin-Bar berücksichtigen */
.admin-bar header.wp-block-template-part {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar header.wp-block-template-part {
    top: 46px;
  }
}

/* Scroll-Anker sauber ausrichten */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* Headerhöhe + Puffer */
}

/* Alle Anker unter Sticky Header korrekt positionieren */
#start,
#leistungen,
#arbeitsweise,
#ueber-uns,
#kontakt {
  scroll-margin-top: 110px; /* Headerhöhe + Sicherheitsabstand */
}

/* ==========================================================
   HEADER DESIGN & NAVIGATION
   ========================================================== */

.kbs-header {
  background-color: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 20px;
  padding-right: 20px;
}

/* Logo / Branding */
.kbs-header-brand img {
  height: auto;
  max-height: 140px; 
  width: auto;
  display: block;
}

.kbs-header-brand a {
  display: inline-flex;
  align-items: center;
}

/* Navigation Links */
.kbs-header-nav a {
  font-size: 1.25rem;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.kbs-header-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: var(--wp--preset--color--accent);
  transition: width 0.2s ease;
}

.kbs-header-nav a:hover::after,
.kbs-header-nav a.is-active::after {
  width: 100%;
}

.kbs-header-nav a.is-active {
  opacity: 1;
  color: var(--wp--preset--color--accent);
}

.kbs-header-nav a:focus-visible {
  outline-offset: 4px;
  border-radius: 4px;
}

/* ==========================================================
   GLOBAL SECTIONS LAYOUT
   ========================================================== */

:root {
  --section-spacing: clamp(3rem, 8vw, 6rem);
}

.kbs-section {
  padding-top: var(--section-spacing);
  padding-bottom: var(--section-spacing);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kbs-section--default {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.kbs-section--light {
  background-color: var(--wp--preset--color--light);
}

.kbs-section--dark {
  background-color: var(--wp--preset--color--secondary);
  color: var(--wp--preset--color--light);
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.kbs-section--dark a {
  color: #60a5fa;
  text-underline-offset: 3px;
}

/* Textcontainer & Buttons zentrieren */
.kbs-section > h1,
.kbs-section > h2,
.kbs-section > p,
.kbs-section > ul,
.kbs-section > .wp-block-buttons {
  width: 100%;
  max-width: 720px;
}

.kbs-section .wp-block-buttons {
  justify-content: center;
}

/* ==========================================================
   TYPOGRAFIE & LISTEN
   ========================================================== */

.kbs-section p, .kbs-section ul, .kbs-section ol { max-width: 65ch; }
.kbs-section h1 { max-width: 36ch; }
.kbs-section h2 { max-width: 32ch; }
.kbs-section h3 { max-width: 30ch; }

.kbs-section p + p { margin-top: 1.25rem; }

/* Strukturierte Listen */
.kbs-section ul {
  list-style: none;
  padding-left: 0;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.kbs-section ul li {
  max-width: 60ch;
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.5rem;
}

.kbs-section ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--wp--preset--color--accent);
  font-weight: bold;
}

/* ==========================================================
   HERO SPEZIFIKATIONEN
   ========================================================== */

.kbs-section:first-of-type {
  padding-top: 7rem;
  padding-bottom: 7rem;
}

.kbs-section:first-of-type h1 { max-width: 34ch; margin-bottom: 1.25rem; }

.kbs-section:first-of-type p:first-of-type {
  max-width: 42ch;
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.kbs-section:first-of-type .wp-block-button__link {
  font-size: 1rem;
  padding: 0.85em 1.6em;
}

.kbs-section:first-of-type .has-small-font-size {
  opacity: 0.75;
  margin-top: 1rem;
}

.kbs-section:first-of-type p.has-small-font-size:last-of-type {
  max-width: 48ch;
  line-height: 1.5;
}

/* ==========================================================
   LEISTUNGEN - OPTIMIERTES GRID & PREMIUM CARDS
   ========================================================== */

/* Grid-Container: Nutzt CSS-Grid für präzise Kontrolle statt Flex */
.kbs-services-grid {
    display: grid !important;
    /* Erzeugt 2 Spalten auf Desktop, die genau gleich breit sind */
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 2.5rem !important; 
    margin-top: 4rem !important;
    max-width: 1100px !important; /* Etwas schmaler für bessere Lesbarkeit */
    padding: 0 !important;
}

/* Deaktiviert WordPress-Standardverhalten für Spalten */
.kbs-services-grid > .wp-block-column {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.kbs-service-card {
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px; /* Weichere Rundung für modernen Look */
    padding: 1rem 0.75rem !important; /* Mehr Innenabstand (Atemraum) */
    text-align: left; /* Wechsel auf Linksbündigkeit für Seriosität */
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.03); /* Subtilerer Schatten */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.kbs-service-card:hover {
    transform: translateY(-8px); /* Etwas dynamischeres Heben */
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.08);
    border-color: var(--wp--preset--color--accent);
}

/* Titel in der Karte hervorheben */
.kbs-service-card h3 {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: var(--wp--preset--color--primary);
    line-height: 1.2;
}

/* Beschreibungstext optimieren */
.kbs-service-card p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    opacity: 0.85;
    color: inherit;
}

/* Mobile Anpassung: 1 Spalte ab Tablet-Größe */
@media (max-width: 960px) {
    .kbs-services-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
}

/* ==========================================================
   ARBEITSWEISE – WORKFLOW GRID
   ========================================================== */

.kbs-section-intro {
  margin-bottom: 4rem;
  font-size: 1.1rem;
  opacity: 0.9;
}

.kbs-workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  text-align: left;
  max-width: 1200px !important;
}

.kbs-workflow-step {
  position: relative;
  padding-top: 2rem;
  border-top: 1px solid rgba(15, 23, 42, 0.1); /* Dezente Trennlinie oben */
}

.kbs-step-number {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--wp--preset--color--accent);
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

.kbs-workflow-step h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.kbs-workflow-step p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.8;
  margin: 0;
}

/* Hover-Effekt: Linie färbt sich bei Interaktion */
.kbs-workflow-step:hover {
  border-top-color: var(--wp--preset--color--accent);
  transition: border-color 0.3s ease;
}

@media (max-width: 768px) {
  .kbs-workflow-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ==========================================================
   ÜBER KBS – GRID & CONTENT
   ========================================================== */

.kbs-about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Linke Spalte etwas breiter */
    gap: 4rem;
    max-width: 1200px !important;
    text-align: left;
    align-items: center;
}

.kbs-about-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.kbs-lead-text {
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--wp--preset--color--primary);
}

.kbs-about-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: #f8fafc; /* Dezente Abhebung */
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.kbs-feature-item strong {
    display: block;
    color: var(--wp--preset--color--accent);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.kbs-feature-item p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.85;
}

/* Responsive Anpassung */
@media (max-width: 960px) {
    .kbs-about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .kbs-about-features {
        padding: 2rem;
    }
}

/* ==========================================================
   KONTAKT – HELL & EINLADEND
   ========================================================== */

/* Wir nutzen den gleichen Hintergrund wie in der Arbeitsweise für Konsistenz */
.kbs-section--light {
    background-color: #f8fafc; 
}

.kbs-contact-card-light {
    max-width: 900px !important; 
    padding: 4.5rem 2.5rem;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05); /* Sehr sanfter Schatten */
    text-align: center;
}

.kbs-contact-card-light h2 {
    color: var(--wp--preset--color--primary);
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 5vw, 2.5rem);
}

.kbs-contact-card-light .kbs-contact-intro {
    color: #475569; /* Ein weicheres Grau für den Text */
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 3rem !important;
}

/* Der Button bleibt als starker Akzent blau */
.kbs-contact-card-light .wp-block-button__link {
    background-color: var(--wp--preset--color--accent) !important;
    padding: 1.25rem 2.5rem !important;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.kbs-contact-card-light .wp-block-button__link:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
    filter: brightness(1.1);
}

/* E-Mail Alternative auf hellem Grund */
.kbs-contact-alternative {
    margin-top: 3.5rem;
    font-size: 0.95rem;
    color: #64748b;
}

.kbs-email-link-dark {
    display: block;
    margin-top: 0.5rem;
    color: var(--wp--preset--color--primary) !important;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.kbs-email-link-dark:hover {
    color: var(--wp--preset--color--accent) !important;
}

/* ==========================================================
   FOOTER – EINLADEND & STRUKTURIERT
   ========================================================== */

.kbs-footer-wrapper {
  background-color: var(--wp--preset--color--secondary); /* Dunkler Hintergrund */
  color: var(--wp--preset--color--light);
  padding: 5rem 20px 2rem 20px;
  width: 100%;
}

.kbs-footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3rem;
}

/* Linke Spalte */
.kbs-footer-brand-col {
  flex: 1;
  min-width: 280px;
  text-align: left;
}

.kbs-footer-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffffff;
}

.kbs-footer-tagline {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.7;
  max-width: 35ch;
}

/* Rechte Spalte */
.kbs-footer-links-col {
  display: flex;
  gap: 4rem;
  min-width: 280px;
}

.kbs-footer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.kbs-footer-nav-group strong {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--wp--preset--color--accent); /* Akzentfarbe für Titel */
}

.kbs-footer-nav-group a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.75;
  transition: all 0.2s ease;
}

.kbs-footer-nav-group a:hover {
  opacity: 1;
  color: var(--wp--preset--color--accent);
  padding-left: 5px; /* Kleiner Interaktionseffekt */
}

/* Untere Zeile */
.kbs-footer-bottom {
  max-width: 1200px;
  margin: 4rem auto 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.kbs-footer-copy {
  font-size: 0.85rem;
  opacity: 0.5;
}

/* Mobil-Optimierung */
@media (max-width: 768px) {
  .kbs-footer-container {
    flex-direction: column;
    text-align: center;
  }
  .kbs-footer-brand-col, .kbs-footer-nav-group {
    text-align: center;
    align-items: center;
  }
  .kbs-footer-tagline {
    margin: 0 auto;
  }
  .kbs-footer-links-col {
    justify-content: center;
    gap: 2rem;
  }
}

/* ==========================================================
   SUPPORT – BUTTONS: LAYOUT-FIX GEGEN ÜBERLAPPUNG
   ========================================================== */

.kbs-support-wrapper .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start; /* WICHTIG */
}

.kbs-support-wrapper .wp-block-button {
  display: block;
  margin-right: 1.25rem;
  margin-bottom: 1.25rem; /* erzwingt echten Zeilenabstand */
}

/* verhindert Überlappung bei Outline-Buttons */
.kbs-support-wrapper .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* Mobile: Buttons untereinander */
@media (max-width: 600px) {
  .kbs-support-wrapper .wp-block-button {
    margin-right: 0;
    width: 100%;
  }

  .kbs-support-wrapper .wp-block-button__link {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================
   KBS CTA BUTTON – FINAL FIX (WP-SAFE)
   ========================================================== */

.kbs-cta-button {
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    min-height: 56px;              /* ← ENTSCHEIDEND */
    padding: 0 2.5rem !important;  /* feste horizontale Höhe */

    font-size: 1.05rem !important;
    font-weight: 600;
    line-height: 1 !important;     /* ← WP-Killer */

    border-radius: 12px;
    border: 2px solid transparent;

    background-color: var(--wp--preset--color--accent) !important;
    color: #ffffff !important;

    text-decoration: none;
    white-space: nowrap;

    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.kbs-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
    filter: brightness(1.05);
}

/* ==========================================================
   KBS CTA BUTTON – OUTLINE (GLEICHE HÖHE)
   ========================================================== */

.kbs-cta-button--outline {
    background-color: transparent !important;
    color: var(--wp--preset--color--accent) !important;
    border-color: var(--wp--preset--color--accent);
}

.kbs-cta-button--outline:hover {
    background-color: var(--wp--preset--color--accent) !important;
    color: #ffffff !important;
}

/* ==========================================================
   SUPPORT – INHALTE ZENTRIEREN
   ========================================================== */

.kbs-support-wrapper {
    text-align: center;
}

.kbs-support-wrapper .kbs-ticket-box,
.kbs-support-wrapper .kbs-support-intro {
    margin-left: auto;
    margin-right: auto;
}

/* Textblöcke sauber begrenzen */
.kbs-support-wrapper p,
.kbs-support-wrapper h2,
.kbs-support-wrapper h3 {
    margin-left: auto;
    margin-right: auto;
    max-width: 65ch;
}

/* Buttons mittig ausrichten */
.kbs-support-wrapper .wp-block-buttons {
    justify-content: center;
}

/* Liste optisch mittig, Inhalt weiterhin gut lesbar */
.kbs-support-wrapper ul {
    display: inline-block;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
}

/* SUPPORT – AKTIONSKARTEN HERVORHEBEN */

body.page-support .kbs-service-card {
    margin-top: 1rem;
}

/* Hinweise zur Bearbeitung */
.kbs-methodik-block {
  text-align: center;
}

.kbs-section-title {
  margin-bottom: 1rem;
}

.kbs-section-intro {
  max-width: 700px;
  margin: 0 auto 3rem auto;
  color: #475569;
}

.kbs-methodik-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.kbs-methodik-item {
  text-align: left;
}

.kbs-methodik-step {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wp--preset--color--accent);
  margin-bottom: 0.5rem;
}

.kbs-methodik-item h3 {
  margin-bottom: 0.5rem;
}

.kbs-methodik-item p {
  color: #475569;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 900px) {
  .kbs-methodik-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   SUPPORT – WP-PAGETITEL AUSBLENDEN (KORREKT)
   ========================================================== */

body.page-id-46 .wp-block-post-title {
    display: none;
}

/* ==========================================================
   SUPPORT – VERTIKALE ABSTÄNDE KORRIGIEREN
   ========================================================== */

/* Main-Offset entfernen */
body.page-id-46 main {
    margin-top: 0 !important;
}

/* Erstes Fullwidth-Group-Padding reduzieren */
body.page-id-46 .wp-block-group.alignfull {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Abstand zwischen Intro & Karten */
body.page-id-46 .kbs-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Intro-Text näher an Karten */
body.page-id-46 .kbs-section p {
    margin-bottom: 1.5rem;
}

/* Card Logik für alle Bereiche */
.kbs-card {
  background: #ffffff00;
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kbs-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

/* ==========================================================
   METHODIK HOVER – AUCH FÜR SUPPORT
   ========================================================== */

.kbs-methodik-block .kbs-methodik-item {
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
}

.kbs-methodik-block .kbs-methodik-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background-color: var(--wp--preset--color--accent);
    transition: width .3s ease;
}

.kbs-methodik-block .kbs-methodik-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.kbs-methodik-block .kbs-methodik-item:hover::before {
    width: 100%;
}

/* ==========================================================
   SUPPORT SYSTEM – LOGIN & REGISTRATION (WPAS)
   Anpassung an KBS 2025 CI
   ========================================================== */

/* Container für das Ticket-Formular-Layout */
.kbs-support-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Flex-Layout für Login & Registrierung nebeneinander */
.wpas-login-register {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 3rem !important;
    justify-content: center;
    text-align: left;
}

/* Die Formular-Boxen im KBS-Karten-Stil */
.wpas-form {
    flex: 1;
    min-width: 320px;
    background: #ffffff !important;
    padding: 3rem !important;
    border-radius: 20px !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.03) !important;
    display: flex;
    flex-direction: column;
}

/* Überschriften in den Formularen (CI Navy) */
.wpas-form h3 {
    color: var(--wp--preset--color--primary) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 2rem !important;
    margin-top: 0 !important;
    border-bottom: 2px solid var(--wp--preset--color--accent);
    display: inline-block;
    padding-bottom: 8px;
}

/* Eingabefelder (Inter & KBS-Light Background) */
.wpas-form-control, 
.wpas-form-group input[type="text"], 
.wpas-form-group input[type="password"], 
.wpas-form-group input[type="email"] {
    width: 100% !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 14px !important;
    background-color: #f8fafc !important;
    font-family: var(--wp--preset--font-family--inter) !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box;
}

.wpas-form-control:focus {
    border-color: var(--wp--preset--color--accent) !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1) !important;
    outline: none !important;
}

/* Labels (CI Navy) */
.wpas-form-group label {
    font-weight: 600 !important;
    color: var(--wp--preset--color--primary) !important;
    margin-bottom: 0.6rem !important;
    display: block;
}

/* Hilfetexte unter den Inputs */
.wpas-help-block, .wpas-form-group span {
    font-size: 0.85rem !important;
    color: #64748b !important;
    line-height: 1.5 !important;
    margin-top: 6px !important;
    display: block;
}

/* Button-Anpassung (KBS Blue) */
.wpas-btn-default, .wpas-btn, button[name="submit"] {
    background-color: var(--wp--preset--color--accent) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 16px 24px !important;
    font-weight: 600 !important;
    font-size: 1.05rem !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    margin-top: 1.5rem !important;
    width: 100% !important;
}

.wpas-btn-default:hover {
    background-color: #1e40af !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2) !important;
}

/* Passwort vergessen Link */
.wpas-forgot-password-link {
    display: inline-block;
    margin-top: 1.25rem;
    color: #64748b !important;
    font-size: 0.9rem;
    text-decoration: none !important;
}

.wpas-forgot-password-link:hover {
    color: var(--wp--preset--color--accent) !important;
    text-decoration: underline !important;
}

/* Responsive Fix für mobile Geräte */
@media (max-width: 768px) {
    .wpas-login-register {
        flex-direction: column;
    }
    .wpas-form {
        padding: 2rem !important;
    }
}

/* ==========================================================
   SUPPORT SYSTEM – DROPDOWN & FORMULAR KORREKTUR (V2)
   Fix für unsichtbare Texte in Select-Feldern
   ========================================================== */

/* 1. Grundlegende Lesbarkeit erzwingen */
.wpas-form-control, 
select.wpas-form-control,
.wpas-form-group select, 
.wpas-form-group input, 
.wpas-form-group textarea {
    color: #1e293b !important; /* Dunkles Anthrazit */
    background-color: #f8fafc !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    /* Korrektur für unsichtbaren Text (Line-Height & Padding) */
    line-height: 1.5 !important;
    height: auto !important;
    min-height: 45px !important;
    padding: 10px 15px !important;
    border: 1px solid #e2e8f0 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 2. Speziell für den gewählten Text im Select-Feld (Browser-Rendering) */
select.wpas-form-control option {
    color: #1e293b !important;
    background-color: #ffffff !important;
}

/* 3. Dropdown-Pfeil wiederherstellen (da appearance: none genutzt wird) */
select.wpas-form-control {
    -webkit-appearance: menulist-button !important; /* Nutzt Browser-Standard-Pfeil */
    appearance: menulist-button !important;
    background-image: none !important; /* Entfernt das fehleranfällige SVG-Icon */
}

/* 4. Button-Leiste oben (Meine Tickets / Logout) */
.wpas-ticket-buttons-top {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.wpas-ticket-buttons-top .wpas-btn {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.wpas-ticket-buttons-top .wpas-btn:hover {
    background-color: var(--wp--preset--color--accent) !important;
    color: #ffffff !important;
    border-color: var(--wp--preset--color--accent) !important;
}

/* 5. WYSIWYG & Dropzone */
#wp-wpas-message-wrap {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
}

.wpas-uploader-dropzone {
    border: 2px dashed #e2e8f0 !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    color: #64748b !important;
}

/* ==========================================================
   SUPPORT SYSTEM – EDITOR (TinyMCE) FIX
   Stellt die Sichtbarkeit und Lesbarkeit des Textfeldes sicher
   ========================================================== */

/* Erzwingt die Sichtbarkeit des Editor-Containers */
.mce-tinymce.mce-container.mce-panel {
    visibility: visible !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    background: #ffffff !important;
}

/* Kopfzeile des Editors (Toolbar) anpassen */
.mce-top-part {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Die Buttons in der Toolbar */
.mce-btn {
    background-color: transparent !important;
    border: none !important;
}

.mce-btn:hover {
    background-color: #e2e8f0 !important;
}

/* Korrektur für den iFrame-Inhalt (Textfarbe beim Tippen) */
/* Hinweis: Da der Editor ein iFrame ist, hilft dieses CSS dem umschließenden Container */
#wpas-message_ifr {
    background-color: #ffffff !important;
    min-height: 250px !important;
}

/* Statusbar (unten am Editor) dezent halten */
.mce-statusbar {
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* Falls das Textfeld (Text-Modus) angezeigt wird */
textarea.wp-editor-area {
    color: #1e293b !important;
    background-color: #ffffff !important;
    line-height: 1.6 !important;
}

/* ==========================================================
   SUPPORT SYSTEM – FINALER EDITOR FIX (DOPPELTES FENSTER)
   ========================================================== */

/* 1. Versteckt das redundante Standard-Textfeld komplett */
textarea#wpas-message.wp-editor-area {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* 2. Stellt sicher, dass der grafische TinyMCE-Editor korrekt angezeigt wird */
.mce-tinymce.mce-container.mce-panel {
    display: block !important;
    visibility: visible !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02) !important;
    overflow: hidden;
}

/* 3. Korrektur der Editor-Innenfarbe auf Weiß */
#wpas-message_ifr {
    background-color: #ffffff !important;
    min-height: 250px !important;
}

/* 4. Fix für die Labels, damit "Beschreibung" nicht am Editor klebt */
#wpas_message_wrapper label {
    display: block;
    margin-bottom: 1rem !important;
}

/* ==========================================================
   SUPPORT SYSTEM – TICKET DETAILS & ANTWORTEN
   Optimierung der Detailansicht und Historie
   ========================================================== */

/* 1. Status-Header Tabelle */
.wpas-table.wpas-ticket-details-header {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.wpas-table.wpas-ticket-details-header thead th {
    background-color: var(--wp--preset--color--primary) !important;
    color: #ffffff !important;
    padding: 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-align: left;
}

.wpas-table.wpas-ticket-details-header tbody td {
    padding: 15px;
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #1e293b;
}

/* 2. Status-Labels (Badges) */
.wpas-label {
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    color: #ffffff !important;
}

/* 3. Ticket-Historie / Antworten */
.wpas-ticket-replies {
    margin-top: 3rem;
    width: 100%;
}

.wpas-reply-single {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    display: block; /* Erlaubt Margin zwischen Antworten */
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.wpas-reply-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.wpas-profilename {
    color: var(--wp--preset--color--primary);
    font-weight: 700;
}

.wpas-reply-time {
    font-size: 0.85rem;
    color: #64748b;
}

/* 4. Antwort-Formular Bereich */
.wpas-ticket-details h3 {
    margin-top: 4rem;
    font-weight: 700;
    color: var(--wp--preset--color--primary);
}

/* Checkbox "Ticket schließen" Styling */
.wpas-submit-ticket .checkbox, .wpas-ticket-details .checkbox {
    margin: 1.5rem 0;
    padding: 12px;
    background: #fffbeb; /* Sanftes Gelb als Hinweis-Farbe */
    border-radius: 8px;
    border: 1px solid #fef3c7;
    display: inline-block;
}

/* 5. Responsive Fix für Tabellen */
@media (max-width: 768px) {
    .wpas-table-responsive {
        overflow-x: auto;
        display: block;
    }
}

textarea#wpas-reply-wysiwyg.wp-editor-area {
    display: none !important;
}