/* ============================================================
   CapitalFinder Shared Layout — cf-shared.css
   Top bar: language switcher + back button
   ============================================================ */

/* ----- Top bar container ----- */
#cf-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(10, 15, 20, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
}

/* ----- Back button ----- */
#cf-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #8aadaa;
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

#cf-back-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e8f0eb;
}

.cf-back-arrow {
  font-size: 16px;
  font-weight: 300;
}

.cf-back-label {
  font-size: 12px;
}

/* ----- Language switcher ----- */
#cf-lang-switcher {
  display: flex;
  gap: 4px;
  align-items: center;
}

#cf-lang-switcher .lang-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: #8aadaa;
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1.4;
  white-space: nowrap;
}

#cf-lang-switcher .lang-btn:hover,
#cf-lang-switcher .lang-btn.active {
  background: #1a7a4a;
  border-color: #1a7a4a;
  color: #fff;
}

/* ----- Body padding for pages that use the top bar ----- */
.cf-has-topbar {
  padding-top: 44px;
}

/* ----- RTL support ----- */
html[dir="rtl"] #cf-top-bar {
  direction: rtl;
}

html[dir="rtl"] #cf-back-btn {
  order: 1;
}

html[dir="rtl"] #cf-lang-switcher {
  order: 0;
}

/* ----- Responsive ----- */
@media (max-width: 600px) {
  .cf-back-label {
    display: none;
  }

  #cf-lang-switcher .lang-btn {
    font-size: 10px;
    padding: 2px 6px;
  }
}
