/* ===== PKKI Global UI fixes ===== */

/* Outline buttons readable everywhere (Astra sometimes hides text) */
.wp-block-button.is-style-outline .wp-block-button__link{
  background:transparent !important;
  border:2px solid #0f766e !important; /* calm teal */
  color:#0f766e !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover{
  background:rgba(15,118,110,0.08) !important;
}

/* Slightly nicer buttons everywhere */
.wp-block-button .wp-block-button__link{
  border-radius:12px;
  padding:0.85em 1.15em;
}

/* Startseite-only polish */
.page-id-44 .wp-block-group[style*="border-width"]{
  background:#fff;
  border-color:#d7e2e1 !important;
  box-shadow:0 6px 18px rgba(0,0,0,0.06);
}

/* Mobile: stack hero buttons nicely */
@media (max-width: 781px){
  .page-id-44 .wp-block-buttons{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    flex-direction:column;
    align-items:stretch;
  }
  .page-id-44 .wp-block-button,
  .page-id-44 .wp-block-button__link{
    width:100%;
    text-align:center;
  }
}

/* --- PKKI Fix: make sure button labels are always visible --- */
.pkki-topics .wp-block-button__link{
  color:#fff !important;
}

/* Outline button should NOT be teal-on-teal */
.pkki-topics .is-style-outline .wp-block-button__link{
  background: transparent !important;
  border: 2px solid var(--ast-global-color-0, #1f8a7c) !important;
  color: var(--ast-global-color-0, #1f8a7c) !important;
}

.pkki-topics .is-style-outline .wp-block-button__link:hover{
  background: var(--ast-global-color-0, #1f8a7c) !important;
  color:#fff !important;
}


/* =========================
   PKKI Dashboard UI
   ========================= */

.pkki-app { margin-top: 22px; }

.pkki-app-layout { gap: 22px; }

/* Sidebar */
.pkki-sidebar-inner {
  background: #fff;
}

.pkki-nav p { margin: 10px 0; }
.pkki-nav a {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  text-decoration: none;
}
.pkki-nav a:hover { text-decoration: underline; }

/* Cards */
.pkki-card {
  background: #fff;
  border-color: rgba(0,0,0,.10) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.04);
}

/* Buttons (safe) */
.pkki-btn .wp-block-button__link{
  background: var(--ast-global-color-0, #1f8a7c) !important;
  color: #fff !important;
  border-radius: 14px !important;
  padding: 12px 18px !important;
  border: 2px solid var(--ast-global-color-0, #1f8a7c) !important;
}

.pkki-btn.is-style-outline .wp-block-button__link{
  background: transparent !important;
  color: var(--ast-global-color-0, #1f8a7c) !important;
}

.pkki-btn.is-style-outline .wp-block-button__link:hover{
  background: var(--ast-global-color-0, #1f8a7c) !important;
  color: #fff !important;
}

/* Mobile: stack sidebar above main */
@media (max-width: 900px){
  .pkki-app-layout { flex-direction: column; }
  .pkki-sidebar, .pkki-main { flex-basis: 100% !important; }
}


/* Pricing highlight */
.pkki-price-highlight{
  border-color: var(--ast-global-color-0, #1f8a7c) !important;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}


/* Pricing highlight */
.pkki-price-highlight{
  border-color: var(--ast-global-color-0, #1f8a7c) !important;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}


/* ================================
   HEADER: make menu + title visible
   ================================ */
.site-header .site-title a,
.site-header .site-description,
.site-header .main-header-menu a,
.site-header .ast-header-menu a,
.site-header .menu-link {
  color: #111 !important;
}

.site-header .main-header-menu a:hover,
.site-header .ast-header-menu a:hover,
.site-header .menu-link:hover {
  opacity: 0.85;
}

/* ================================
   HEADER: hide the "CALL TO ACTION" button everywhere
   (common Astra header button selectors)
   ================================ */
.site-header .ast-header-button-1-wrap,
.site-header .ast-header-button-1,
.site-header .ast-custom-button,
.site-header .ast-custom-button-link,
.site-header .header-button {
  display: none !important;
}


/* ================================
   Astra: remove header "Call to Action" button block everywhere
   ================================ */
.site-header .ast-builder-button-wrap {
  display: none !important;
}


/* ================================
   Astra header: make Public Menu links visible (dark on light header)
   ================================ */
.ast-primary-header-bar .main-header-menu > li > a,
.ast-primary-header-bar .ast-header-menu > li > a,
.ast-primary-header-bar a.menu-link,
.ast-header-break-point .main-header-menu a,
.ast-header-break-point .ast-mobile-header-wrap a.menu-link {
  color: #111 !important;
}

.ast-primary-header-bar .main-header-menu > li > a:hover,
.ast-primary-header-bar a.menu-link:hover,
.ast-header-break-point .main-header-menu a:hover {
  opacity: 0.85;
}

.ast-primary-header-bar .main-header-menu .current-menu-item > a,
.ast-primary-header-bar .main-header-menu .current-menu-ancestor > a {
  color: #111 !important;
  font-weight: 600;
}


/* =========================
   HEADER FIX (Astra theme)
   - menu text was white on light background
   - hide Astra "Call to Action" button everywhere
   ========================= */

/* Make header + menu text dark (visible) */
.site-header .site-title a,
.site-header .site-description,
.site-header .main-header-menu a,
.site-header .ast-header-menu a,
.site-header a.menu-link,
.site-header .ast-builder-menu a {
  color: #111 !important;
}

/* Hover / active states */
.site-header .main-header-menu a:hover,
.site-header .ast-header-menu a:hover,
.site-header a.menu-link:hover,
.site-header .current-menu-item > a,
.site-header .current-menu-ancestor > a {
  opacity: 0.85;
}

/* Hide the Astra header button ("Call to Action") everywhere */
.ast-builder-button-wrap,
.ast-header-button,
.ast-custom-button-link,
.ast-custom-button {
  display: none !important;
}


/* ===== PKKI Upgrade Page Cards ===== */
.pkki-upgrade .pkki-plans { gap: 18px; }
.pkki-upgrade .pkki-plan-card { background: #fff; }
.pkki-upgrade .pkki-plan-card .pkki-price { font-size: 1.1rem; margin-top: 6px; }
.pkki-upgrade .pkki-plan-highlight { border-color: #1f8f7a !important; }
.pkki-upgrade .wp-block-button__link { width: 100%; text-align: center; }

/* Responsive spacing */
@media (max-width: 781px) {
  .pkki-upgrade .wp-block-columns { flex-wrap: wrap; }
  .pkki-upgrade .wp-block-column { width: 100%; }
}

/* Hide Astra Header "Call to Action" button/link */
.ast-builder-button-wrap a[aria-label="Call to Action"],
.ast-builder-button-wrap .ast-custom-button,
.ast-builder-button-wrap .ast-custom-button-link,
.ast-builder-button-wrap .menu-link {
  display: none !important;
}

/* Ensure header menu text is visible on light header backgrounds */
.site-header .site-title a,
.site-header .site-description,
.site-header .main-header-menu a,
.site-header .ast-header-menu a,
.site-header .menu-link {
  color: #111 !important;
}

/* ===== PKKI App UI (Dashboard/Results) ===== */
.pkki-cards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0 14px;
}
.pkki-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  padding:16px;
}
.pkki-card-title{ font-size:12px; opacity:.75; margin-bottom:6px; }
.pkki-card-value{ font-size:28px; font-weight:700; line-height:1.1; }
.pkki-card-sub{ font-size:14px; opacity:.85; margin-top:6px; }

.pkki-banner{
  background: rgba(31,143,122,.10);
  border: 1px solid rgba(31,143,122,.25);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0 14px;
}
.pkki-banner-muted{
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.10);
}

.pkki-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 12px;
}
.pkki-btn{
  display:inline-block;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  background:#111;
  color:#fff !important;
  text-decoration:none !important;
}
.pkki-btn:hover{ opacity:.9; }
.pkki-btn-secondary{
  background:#fff;
  color:#111 !important;
}

.pkki-table-wrap{ overflow:auto; }
.pkki-table{
  width:100%;
  border-collapse: collapse;
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  overflow:hidden;
}
.pkki-table th, .pkki-table td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  text-align:left;
  font-size:14px;
}
.pkki-table th{ font-size:12px; opacity:.75; }
.pkki-table tr:last-child td{ border-bottom:none; }

@media (max-width: 781px){
  .pkki-cards{ grid-template-columns: 1fr; }
  .pkki-btn{ width:100%; text-align:center; }
}


/* ===== PKKI App Sidebar ===== */
.pkki-app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.pkki-app-nav {
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 10px;
  position: sticky;
  top: 16px;
}

.pkki-app-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pkki-app-nav-list li a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none !important;
  color: #111 !important;
  border: 1px solid transparent;
}

.pkki-app-nav-list li a:hover {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.06);
}

@media (max-width: 900px){
  .pkki-app-shell { grid-template-columns: 1fr; }
  .pkki-app-nav { position: static; }
}


/* ===== Progress Bar ===== */
.pkki-progress{
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  padding:14px 16px;
  margin: 10px 0 14px;
}
.pkki-progress-top{
  display:flex;
  justify-content:space-between;
  font-size:12px;
  opacity:.8;
  margin-bottom:8px;
}
.pkki-progress-bar{
  height:10px;
  background: rgba(0,0,0,.08);
  border-radius:999px;
  overflow:hidden;
}
.pkki-progress-fill{
  height:100%;
  background:#1f8f7a;
  border-radius:999px;
}
.pkki-progress-sub{
  font-size:13px;
  opacity:.85;
  margin-top:8px;
}

/* ===== Weak Topics ===== */
.pkki-weak-topics{ margin-top: 12px; }
.pkki-weak-list{
  list-style:none;
  padding:0;
  margin: 10px 0 0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.pkki-weak-list li{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  background: rgba(0,0,0,.02);
}
.pkki-weak-name{ font-weight:600; }
.pkki-weak-meta{ opacity:.8; font-size:13px; }

/* Results cards on top */
.pkki-results-cards{ margin-top: 12px; }


/* PKKI FIX: ensure submit buttons are clickable (no overlay steals clicks) */
.pkki-wrap .pkki-btn,
.pkki-wrap button,
.pkki-wrap input[type="submit"]{
  pointer-events: auto !important;
  position: relative;
  z-index: 50;
}


/* Hide Astra header CTA button + link */
.ast-builder-button-wrap,
a[aria-label="Call to Action"],
.ast-custom-button-link,
.ast-custom-button {
  display: none !important;
}

/* Fix menu link color on light header */
.site-header .main-header-menu a,
.site-header .ast-header-menu a,
.site-header .menu-link,
.site-header .site-title a,
.site-header .site-description {
  color: #111 !important;
}

/* Ensure PKKI submit button is actually clickable */
.pkki-submit, .pkki-submit-btn, #pkki-submit, button.pkki-btn {
  pointer-events: auto !important;
  position: relative;
  z-index: 50;
}

/* Common overlays that accidentally block clicks */
.pkki-overlay, .pkki-loading, .pkki-modal-backdrop, .pkki-blocker {
  pointer-events: none !important;
}

/* Hide Astra header CTA button + link */
.ast-builder-button-wrap,
a[aria-label="Call to Action"],
.ast-custom-button-link,
.ast-custom-button {
  display: none !important;
}

/* Fix menu link color on light header */
.site-header .main-header-menu a,
.site-header .ast-header-menu a,
.site-header .menu-link,
.site-header .site-title a,
.site-header .site-description {
  color: #111 !important;
}

/* PKKI-CLICK-FIX */
.pkki-submit, .pkki-submit-btn, #pkki-submit, button.pkki-btn {
  pointer-events: auto !important;
  position: relative;
  z-index: 50;
}
.pkki-overlay, .pkki-loading, .pkki-modal-backdrop, .pkki-blocker {
  pointer-events: none !important;
}

/* =========================
   STUDY MODE UI FIXES
   Page ID 610 = Study Mode
   ========================= */

/* Hide "Exam Mode" buttons inside Study Mode page */
body.page-id-610 a[href*="exam-mode"]{
  display:none !important;
}

/* Hide "PDF öffnen / herunterladen" links (direct PDF links) */
body.page-id-610 a[href*="pkki-study-pdfs"][href$=".pdf"]{
  display:none !important;
}

/* Make the embedded PDF look nicer */
body.page-id-610 iframe[src*=".pdf"],
body.page-id-610 embed[src*=".pdf"],
body.page-id-610 object[data*=".pdf"]{
  width:100% !important;
  min-height:80vh !important;
  border:1px solid #e5e5e5 !important;
  border-radius:16px !important;
  background:#fff !important;
}

/* PKKI App Menu - force visible + fixed on mobile */
@media (max-width: 900px){
  .pkki-app-menu, .pkki-bottom-nav, nav.pkki-app-menu {
    position: fixed !important;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
  }
  body { padding-bottom: 78px; }
}
