/* =======================================================
   Togdrift AS – Global app-layout (Delprosjekt 7 – Layout)
   Baseline: Navy (#000d29), Orange (#f59800), Silver (#e0e3ec)
   ======================================================= */

:root{
  --tg-navy:#000d29;
  --tg-orange:#f59800;
  --tg-silver:#e0e3ec;

  --tg-wrap:1280px;
  --tg-pad:16px;

  /* Tilbake-knapp offset fra innholdskant (positiv = høyre) */
  --tg-left-offset: 36px;
}

/* Grunnfarger + transparenslag */
html,body{ background:var(--tg-navy); color:var(--tg-silver); }
.site,.site-content,.site-main,.ast-container,.ast-plain-container,
.content-area,#content,#primary,main,
.container,.bb-grid,.bb-page,.bp-wrap,.bb-wrap,
.entry-content,.elementor-section,.elementor-container{ background:transparent !important; }

/* Lenker globalt */
a{ color:var(--tg-orange); text-decoration:none; }
a:hover,a:focus{ text-decoration:underline; }

/* Skjul header/footer og auto-titler (Astra) */
#masthead,.site-header,#colophon,.site-footer,.entry-header,.ast-archive-title{ display:none !important; }

/* Innholdscontainer (midtstilt) */
.site-content,.ast-container,main,#primary{ max-width:var(--tg-wrap); margin:0 auto; padding:var(--tg-pad); }

/* Knapper (globalt) */
button,.button,.bb-button,.wp-block-button__link,
input[type=submit],input[type=button],input[type=reset]{
  background:var(--tg-orange) !important; color:var(--tg-navy) !important;
  border:0; border-radius:12px; padding:10px 16px; font-weight:700;
}
button:hover,.button:hover,.bb-button:hover,.wp-block-button__link:hover,
input[type=submit]:hover,input[type=button]:hover,input[type=reset]:hover{ filter:brightness(1.05); }

/* Kort/tiles – IKKE på /min-side/ (der bevarer vi egne farger) */
.tg-app:not(.tg-preserve-tiles) .tg-card,
.tg-app:not(.tg-preserve-tiles) .tg-tile,
.tg-app:not(.tg-preserve-tiles) .tile,
.tg-app:not(.tg-preserve-tiles) .card,
.tg-app:not(.tg-preserve-tiles) .bp-card,
.tg-app:not(.tg-preserve-tiles) .bb-card,
.tg-app:not(.tg-preserve-tiles) .ast-article-post,
.tg-app:not(.tg-preserve-tiles) .widget,
.tg-app:not(.tg-preserve-tiles) .wp-block-group{
  background:linear-gradient(160deg, rgba(224,227,236,.06), rgba(224,227,236,.02)) !important;
  border:1px solid rgba(224,227,236,.16) !important;
  border-radius:18px !important;
  box-shadow:0 8px 24px rgba(0,0,0,.25) !important;
  backdrop-filter:blur(2px);
}

/* Overskrifter */
h1,h2,h3,h4{ color:var(--tg-silver); }
h1,.entry-title{ color:var(--tg-orange); letter-spacing:.3px; }

/* «Tilbake»-flis – forankret til innholdskant + offset.
   Skjules til posisjon er klar (JS setter .tg-ready). */
.tg-back-tile{
  position:fixed; top:16px;
  left:calc( max(10px, var(--tg-left, calc((100vw - var(--tg-wrap))/2 + var(--tg-pad)))) + var(--tg-left-offset) );
  width:64px; height:64px;
  background:linear-gradient(135deg, rgba(224,227,236,.22), rgba(224,227,236,.10));
  border:1px solid rgba(224,227,236,.28); border-radius:18px;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 24px rgba(0,0,0,.35); z-index:500;
  visibility:hidden; opacity:0; pointer-events:none; transform:translateX(-9999px);
}
.tg-ready .tg-back-tile{ visibility:visible; opacity:1; pointer-events:auto; transform:none; }
.tg-no-back .tg-back-tile{ display:none !important; }
.tg-back-icon{ width:46px; height:46px; display:block; color:var(--tg-orange); }
.tg-back-tile:focus{ outline:2px solid var(--tg-orange); outline-offset:4px; }

/* ------------------------------
   Fluent Forms Pro – farger/inputs
   ------------------------------ */
.ff-el-input--label,.ff-el-group label,.ff-el-required,
.ff-el-description,.ff-el-help,.ff-message-success,.ff-message-error,
.ff-error-msg,.ff-el-form-control::placeholder{ color:var(--tg-silver) !important; }
.ff-el-input--content,.ff-el-group .text-sm,.ff-el-group .ff-description{ color:var(--tg-silver) !important; }

.ff-el-form-control,
input.ff-el-form-control,select.ff-el-form-control,textarea.ff-el-form-control,
.ff-upload-btn,.ff-el-form-control input,.ff-el-form-control select,.ff-el-form-control textarea{
  background:rgba(224,227,236,.06) !important; color:var(--tg-silver) !important;
  border:1px solid rgba(224,227,236,.18) !important; border-radius:12px !important;
}
.ff-btn-submit{ background:var(--tg-orange) !important; color:var(--tg-navy) !important; border-radius:12px !important; font-weight:700; }
.ff-el-form-control[type="checkbox"],.ff-el-form-control[type="radio"]{ accent-color:var(--tg-orange); }
::placeholder{ color:var(--tg-silver); opacity:.75; }

/* =======================================================
   BuddyBoss Activity (/aktivitet/ m.fl.) – mørke kort
   ======================================================= */

/* 1) Gjør hvite aktivitet-kort mørke (navy), med sølv-outline */
.bp-activity .activity-list > li,
.bp-activity .activity-list > li .activity-inner,
.bp-activity .activity-list > li .activity-content,
.bp-activity .activity-list > li .activity-comments{
  background: rgba(255,255,255,0.02) !important;         /* veldig mørk, nesten navy */
  border: 1px solid rgba(224,227,236,0.16) !important;   /* sølv-outline */
  border-radius: 18px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25) !important;
  color: var(--tg-silver) !important;
}

/* Fjern eventuell hvit bakgrunn som settes dypere */
.bp-activity .activity-list > li .activity-content *{
  background: transparent !important;
}

/* 2) Brødtekst i kort = sølv, navn/lenker = oransje */
.bp-activity .activity-content,
.bp-activity .activity-item .activity-header,
.bp-activity .acomment-content{ color:var(--tg-silver) !important; }

.bp-activity .activity-item .activity-header a,
.bp-activity .activity-content a{
  color:var(--tg-orange) !important;
}

/* 3) Liker/kommenter – diskrete outline-knapper inne i kort */
.bp-activity .activity-meta a.button,
.bp-activity .generic-button a,
.bp-activity .acomment-options a{
  background: transparent !important;
  color: var(--tg-silver) !important;
  border:1px solid rgba(224,227,236,0.35) !important;
  border-radius:12px !important;
}
.bp-activity .activity-meta a.button:hover,
.bp-activity .generic-button a:hover,
.bp-activity .acomment-options a:hover{
  background: rgba(224,227,236,0.10) !important;
  border-color: rgba(224,227,236,0.55) !important;
}

/* 4) Filtre/velgere/søk øverst – ghost på navy, ikke oransje */
.bp-activity select,
.bp-activity .select-wrap select,
.bp-activity .bb-select select,
.bp-activity .select2-container .select2-selection--single{
  background: rgba(224,227,236,0.08) !important;
  color: var(--tg-silver) !important;
  border:1px solid rgba(224,227,236,0.35) !important;
  border-radius:12px !important;
}
.bp-activity .select2-selection__rendered{ color: var(--tg-silver) !important; }

.bp-activity .dir-search input[type="submit"],
.bp-activity .dir-search button{
  background: transparent !important;
  color: var(--tg-silver) !important;
  border:1px solid rgba(224,227,236,0.35) !important;
  border-radius:12px !important;
}
.bp-activity .dir-search input[type="submit"]:hover,
.bp-activity .dir-search button:hover{
  background: rgba(224,227,236,0.12) !important;
}

/* 5) Input-felt i aktivitet-kommentarer – mørke felter */
.bp-activity textarea,
.bp-activity input[type="text"],
.bp-activity input[type="search"]{
  background: rgba(224,227,236,0.06) !important;
  color: var(--tg-silver) !important;
  border:1px solid rgba(224,227,236,0.18) !important;
  border-radius:12px !important;
}

/* ------------------------------
   Responsive
   ------------------------------ */
@media (max-width:1024px){
  .site-content,.ast-container,main,#primary{ padding:12px; }
  .tg-back-tile{ top:12px; }
}
@media (max-width:768px){
  .site-content,.ast-container,main,#primary{ padding:10px; }
  .tg-back-tile{ top:10px; left:10px; width:52px; height:52px; border-radius:14px; }
  .tg-back-icon{ width:42px; height:42px; }
}

/* ==========================================
   Stabil finpuss for BuddyBoss aktivitet
   (ingen layout-endring, kun farger/knapper)
   ========================================== */

/* A) Tekst INNI aktivitet-kort på hvit bakgrunn = mørk for lesbarhet */
.bp-activity .activity-content,
.bp-activity .activity-item .activity-header,
.bp-activity .acomment-content,
#activity-stream .activity-content,
#activity-stream .activity-item .activity-header,
#activity-stream .acomment-content{
  color:#111 !important;
}

/* B) "Liker/kommenter" inne i kort = nøytrale outline-knapper */
.bp-activity .activity-meta a.button,
.bp-activity .generic-button a,
.bp-activity .acomment-options a,
#activity-stream .activity-meta a.button,
#activity-stream .generic-button a,
#activity-stream .acomment-options a{
  background: transparent !important;
  color: #111 !important;
  border: 1px solid rgba(0,13,41,0.25) !important; /* subtil kant */
  border-radius: 12px !important;
}
.bp-activity .activity-meta a.button:hover,
.bp-activity .generic-button a:hover,
.bp-activity .acomment-options a:hover,
#activity-stream .activity-meta a.button:hover,
#activity-stream .generic-button a:hover,
#activity-stream .acomment-options a:hover{
  background: rgba(0,13,41,0.06) !important;
  color: #111 !important;
  border-color: rgba(0,13,41,0.35) !important;
}

/* C) Topp-filtre og søk – ghost på navy (ikke oransje flater) */
.bp-activity select,
.bp-activity .select-wrap select,
.bp-activity .bb-select select,
.bp-activity .select2-container .select2-selection--single,
#activity-stream select,
#activity-stream .select-wrap select,
#activity-stream .bb-select select,
#activity-stream .select2-container .select2-selection--single{
  background: rgba(224,227,236,0.10) !important;
  color: var(--tg-silver) !important;
  border: 1px solid rgba(224,227,236,0.35) !important;
  border-radius: 12px !important;
}
.select2-selection__rendered{ color: var(--tg-silver) !important; }

.bp-activity .dir-search input[type="submit"],
.bp-activity .dir-search button,
#activity-stream .dir-search input[type="submit"],
#activity-stream .dir-search button{
  background: transparent !important;
  color: var(--tg-silver) !important;
  border: 1px solid rgba(224,227,236,0.35) !important;
  border-radius: 12px !important;
}
.bp-activity .dir-search input[type="submit"]:hover,
.bp-activity .dir-search button:hover,
#activity-stream .dir-search input[type="submit"]:hover,
#activity-stream .dir-search button:hover{
  background: rgba(224,227,236,0.12) !important;
}
/* =========================================================
   BuddyBoss Aktivitet – målrettet fiks (farger, ikke layout)
   ========================================================= */

/* 1) INNI KORT: brødtekst skal være mørk (#111) for lesbarhet */
.bp-activity .activity-list > li .activity-inner,
.bp-activity .activity-list > li .activity-content,
.bp-activity .activity-list > li .activity-comments,
#activity-stream > li .activity-inner,
#activity-stream > li .activity-content,
#activity-stream > li .activity-comments{
  color:#111 !important;
}

/* Lenker (f.eks. brukernavn/“Jan Morten”) får være oransje for affordance */
.bp-activity .activity-item .activity-header a,
#activity-stream .activity-item .activity-header a,
.bp-activity .activity-content a,
#activity-stream .activity-content a{
  color: var(--tg-orange) !important;
}

/* 2) «Liker / kommenter» INNI KORT: nøytral outline + IKON = samme farge som tekst */
.bp-activity .activity-meta a.button,
.bp-activity .generic-button a,
.bp-activity .acomment-options a,
#activity-stream .activity-meta a.button,
#activity-stream .generic-button a,
#activity-stream .acomment-options a{
  background: transparent !important;
  color: #111 !important; /* tekstfarge */
  border: 1px solid rgba(0,13,41,0.25) !important;
  border-radius: 12px !important;
}
.bp-activity .activity-meta a.button:hover,
.bp-activity .generic-button a:hover,
.bp-activity .acomment-options a:hover,
#activity-stream .activity-meta a.button:hover,
#activity-stream .generic-button a:hover,
#activity-stream .acomment-options a:hover{
  background: rgba(0,13,41,0.06) !important;
  color: #111 !important;
  border-color: rgba(0,13,41,0.35) !important;
}
/* Ikoner inni knappene (BuddyBoss bruker ofte .bb-icon / svg) */
.bp-activity .activity-meta a.button :is(.bb-icon, svg),
.bp-activity .generic-button a :is(.bb-icon, svg),
.bp-activity .acomment-options a :is(.bb-icon, svg),
#activity-stream .activity-meta a.button :is(.bb-icon, svg),
#activity-stream .generic-button a :is(.bb-icon, svg),
#activity-stream .acomment-options a :is(.bb-icon, svg){
  color:#111 !important; fill: currentColor !important; stroke: currentColor !important;
}

/* 3) TOPP-KONTROLLER PÅ NAVY: ghost-stil (ingen oransje flater) */
.bp-activity :is(select,.select-wrap select,.bb-select select,.select2-container .select2-selection--single),
#activity-stream :is(select,.select-wrap select,.bb-select select,.select2-container .select2-selection--single){
  background: rgba(224,227,236,0.10) !important;
  color: var(--tg-silver) !important;
  border: 1px solid rgba(224,227,236,0.35) !important;
  border-radius: 12px !important;
}
.bp-activity .select2-selection__rendered,
#activity-stream .select2-selection__rendered{ color: var(--tg-silver) !important; }

/* Søkeknapper/filtreringsknapper (øverst) – ghost */
.bp-activity .dir-search :is(input[type="submit"],button),
#activity-stream .dir-search :is(input[type="submit"],button){
  background: transparent !important;
  color: var(--tg-silver) !important;
  border: 1px solid rgba(224,227,236,0.35) !important;
  border-radius:12px !important;
}
.bp-activity .dir-search :is(input[type="submit"],button):hover,
#activity-stream .dir-search :is(input[type="submit"],button):hover{
  background: rgba(224,227,236,0.12) !important;
}

/* 4) PLACEHOLDERS inni kort (kommentarfelt etc.) skal være tydeligere */
.bp-activity :is(textarea,input[type="text"],input[type="search"])::placeholder,
#activity-stream :is(textarea,input[type="text"],input[type="search"])::placeholder{
  color:#666 !important; /* litt mørkere enn før */
  opacity:1 !important;
}
/* ================================
   BuddyBoss Activity – pills & søk
   ================================ */

/* 1) Filtre/dropdowns ("alle oppdateringer" / "nye innlegg") */
.bb-activity-filters .bb-dropdown-toggle,
.activity-filters .bb-dropdown-toggle,
.bp-activity .bb-dropdown-toggle,
#activity-stream .bb-dropdown-toggle,
.bb-activity-filters .bb-pill,
.activity-filters .bb-pill,
.bp-activity .bb-pill,
#activity-stream .bb-pill{
  background: transparent !important;
  color: var(--tg-silver) !important;
  border: 1px solid rgba(224,227,236,0.35) !important;
  border-radius: 12px !important;
}
.bb-activity-filters .bb-dropdown-toggle :is(.bb-icon,svg),
.activity-filters .bb-dropdown-toggle :is(.bb-icon,svg),
.bp-activity .bb-dropdown-toggle :is(.bb-icon,svg),
#activity-stream .bb-dropdown-toggle :is(.bb-icon,svg){
  color: var(--tg-silver) !important;
  fill: currentColor !important;
}

/* 2) Søkefelt og søkeknapp i activity-listen */
.bp-activity .dir-search input[type="search"],
#activity-stream .dir-search input[type="search"],
.bp-activity .dir-search input[type="text"],
#activity-stream .dir-search input[type="text"]{
  background: rgba(224,227,236,0.06) !important;
  color: var(--tg-silver) !important;
  border: 1px solid rgba(224,227,236,0.35) !important;
  border-radius: 12px !important;
}
.bp-activity .dir-search :is(button, input[type="submit"]),
#activity-stream .dir-search :is(button, input[type="submit"]){
  background: transparent !important;
  color: var(--tg-silver) !important;
  border: 1px solid rgba(224,227,236,0.35) !important;
  border-radius: 12px !important;
}
.bp-activity .dir-search :is(button, input[type="submit"]) :is(.bb-icon,svg),
#activity-stream .dir-search :is(button, input[type="submit"]) :is(.bb-icon,svg){
  color: var(--tg-silver) !important;
  fill: currentColor !important;
}
.bp-activity .dir-search :is(input[type="search"], input[type="text"])::placeholder,
#activity-stream .dir-search :is(input[type="search"], input[type="text"])::placeholder{
  color: #98a1b3 !important;
  opacity: 1 !important;
}
