/*
 * layout-stake.css
 * Transforms the site to a Stake-style layout:
 *   1. Horizontal header-menu → collapsible left sidebar
 *   2. Inline login form → Login button + popup modal
 *   3. Heavy footer → slim single-row bar
 *   4. Two floating FABs → collapsible right-side tab panel
 *
 * Desktop only (≥769px) for sidebar / login changes.
 * FAB tab applies on all screen sizes on /secure/* pages.
 */

/* ================================================================
   1. SIDEBAR — Stake-style: pinned + collapsible icon rail
   ================================================================ */
:root {
  --stake-sb-w: 240px;            /* expanded width */
  --stake-sb-w-collapsed: 68px;   /* collapsed icon-rail width */
}

.stake-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--stake-sb-w);
  background: #071126;
  border-right: 1px solid #1a3a6b;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.stake-sidebar--collapsed { width: var(--stake-sb-w-collapsed); }

/* Sidebar header — hamburger toggle + logo */
.stake-sidebar__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #1a3a6b;
  flex-shrink: 0;
  min-height: 60px;
  box-sizing: border-box;
}
.stake-sidebar--collapsed .stake-sidebar__head {
  justify-content: center;
  padding: 12px 0;
}
.stake-sidebar__toggle {
  background: transparent;
  border: none;
  color: #c2d4ec;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.stake-sidebar__toggle:hover { background: rgba(61, 157, 232, 0.12); color: #3d9de8; }
.stake-sidebar__logo {
  height: 30px;
  width: auto;
  object-fit: contain;
}
.stake-sidebar--collapsed .stake-sidebar__logo { display: none; }

/* Sidebar scrollable nav area */
.stake-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
}
.stake-sidebar__nav::-webkit-scrollbar { width: 4px; }
.stake-sidebar__nav::-webkit-scrollbar-track { background: transparent; }
.stake-sidebar__nav::-webkit-scrollbar-thumb { background: #1a3a6b; border-radius: 2px; }

/* Nav list */
.stake-sidebar__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex !important;
  flex-direction: column !important;
}
.stake-sidebar__nav-item {
  padding: 0 !important;
  width: 100%;
  border-bottom: none !important;
}
.stake-sidebar__nav-item a {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 13px 22px !important;
  color: #c2d4ec !important;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.stake-sidebar__nav-item a:hover,
.stake-sidebar__nav-item.is-active a {
  background: rgba(61, 157, 232, 0.08) !important;
  color: #ffffff !important;
  border-left-color: #3d9de8 !important;
}
.stake-sidebar__nav-item a i {
  width: 20px;
  text-align: center;
  color: #5e83a8;
  font-size: 16px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.stake-sidebar__nav-item a:hover i,
.stake-sidebar__nav-item.is-active a i { color: #3d9de8; }

/* Collapsed: hide labels, center icons */
.stake-sidebar--collapsed .stake-sidebar__nav-item a {
  justify-content: center;
  padding: 15px 0 !important;
  gap: 0;
}
.stake-sidebar--collapsed .stake-sidebar__nav-item a span { display: none; }

/* Sidebar bottom — version/copyright */
.stake-sidebar__foot {
  padding: 12px 16px;
  border-top: 1px solid #1a3a6b;
  font-size: 11px;
  color: #2d4a70;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
}
.stake-sidebar--collapsed .stake-sidebar__foot {
  text-align: center;
  padding: 12px 4px;
  font-size: 9px;
}

/* ================================================================
   2. BODY PUSH — content sits beside the pinned sidebar (desktop)
   ================================================================ */
@media (min-width: 769px) {
  body.stake-has-sidebar {
    padding-left: var(--stake-sb-w);
    transition: padding-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  body.stake-has-sidebar.stake-sb-collapsed {
    padding-left: var(--stake-sb-w-collapsed);
  }
}
/* Hide the original horizontal header-menu nav PERMANENTLY (not dependent on JS-added class) */
.header-menu { display: none !important; }

/* Mobile: hide the desktop sidebar; native mobile layout handles nav */
@media (max-width: 768px) {
  .stake-sidebar { display: none !important; }
  body.stake-has-sidebar { padding-left: 0 !important; }
}

/* ================================================================
   4. LOGIN MODAL (pre-login pages — index.html)
   ================================================================ */
.stake-login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10010;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.stake-login-modal--open {
  opacity: 1;
  visibility: visible;
}
.stake-login-dialog {
  background: linear-gradient(145deg, #0b1a35, #0f2040);
  border: 1px solid #1a3a6b;
  border-radius: 14px;
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  position: relative;
  animation: stakeModalPop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes stakeModalPop {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.stake-login-dialog__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.stake-login-dialog__logo img {
  height: 38px;
  width: auto;
}
.stake-login-dialog__title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 22px;
  letter-spacing: 0.5px;
}
.stake-login-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  color: #5e83a8;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}
.stake-login-close:hover { color: #e8f4ff; }

/* Form fields inside modal */
.stake-login-dialog .form-group { margin-bottom: 14px; }
.stake-login-dialog .form-control {
  width: 100%;
  background: #071526 !important;
  border: 1px solid #1a3a6b !important;
  border-radius: 6px;
  color: #e8f4ff !important;
  padding: 11px 14px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.stake-login-dialog .form-control:focus {
  border-color: #3d9de8 !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(61, 157, 232, 0.18) !important;
}
.stake-login-dialog .form-control::placeholder { color: #2d4a70; }
.stake-login-dialog .button--login {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 4px;
  border-radius: 6px;
  background: #1b6fd4 !important;
  border: none;
  color: #fff !important;
  transition: background 0.2s, transform 0.1s;
}
.stake-login-dialog .button--login:hover {
  background: #2d8cef !important;
  transform: translateY(-1px);
}
.stake-login-dialog .g8pop-forgot {
  display: block;
  text-align: right;
  color: #5e83a8;
  font-size: 12px;
  cursor: pointer;
  margin-top: -6px;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.stake-login-dialog .g8pop-forgot:hover { color: #3d9de8; }
.stake-login-dialog__register {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: #5e83a8;
}
.stake-login-dialog__register a {
  color: #3d9de8;
  font-weight: 700;
  text-decoration: none;
}
.stake-login-dialog__register a:hover { color: #79bdf0; }

/* Replace inline form — show Login + Register buttons in header */
.stake-header-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stake-header-btns .btn-login-trigger {
  background: transparent;
  border: 1px solid #3d9de8;
  color: #3d9de8;
  padding: 7px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: Roboto, sans-serif;
}
.stake-header-btns .btn-login-trigger:hover {
  background: rgba(61, 157, 232, 0.12);
  color: #79bdf0;
}
.stake-header-btns .btn-register-trigger {
  background: #1b6fd4;
  border: none;
  color: #fff;
  padding: 7px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  font-family: Roboto, sans-serif;
}
.stake-header-btns .btn-register-trigger:hover { background: #2d8cef; }

/* ================================================================
   5. FOOTER — simplified to a single slim bar
   ================================================================ */
.information { display: none !important; }
.partner     { display: none !important; }
.footer-wrap { display: none !important; } /* in case of extra wrap */

footer .nav-bottom {
  display: flex !important;
  justify-content: center !important;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 14px 16px 10px !important;
  border-bottom: 1px solid #1a3a6b;
}
footer .nav-bottom li { padding: 0 !important; }
footer .nav-bottom li a {
  font-size: 12px;
  color: #5e83a8 !important;
  transition: color 0.2s;
}
footer .nav-bottom li a:hover { color: #3d9de8 !important; }
footer .nav-bottom .seo { display: none; }

footer .row-end-footer {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 12px 16px !important;
  flex-wrap: wrap;
}
footer .row-end-footer > div:first-child { display: none !important; }
footer .row-end-footer p {
  font-size: 12px;
  color: #2d4a70;
  margin: 0;
  order: 1;
}
footer .box-information {
  display: flex;
  align-items: center;
  gap: 10px;
  order: 2;
}
footer .box-information img { height: 24px; width: auto; opacity: 0.6; }
footer { padding-bottom: 0 !important; }

/* ================================================================
   6. FAB TAB — compact collapsible right-side panel
   ================================================================ */

/* Hide original FABs */
.ci-fab  { display: none !important; }
.wc-fab  { display: none !important; }

/* The tab wrapper */
.stake-fab-tab {
  position: fixed;
  right: 0;
  bottom: 180px;
  z-index: 9994;
  display: flex;
  align-items: stretch;
}

/* The items panel (slides out from the right) — compact */
.stake-fab-tab__panel {
  background: #071126;
  border: 1px solid #1a3a6b;
  border-right: none;
  border-radius: 6px 0 0 6px;
  overflow: hidden;
  transition: width 0.28s ease, opacity 0.28s ease;
  width: 64px;
  display: flex;
  flex-direction: column;
}
.stake-fab-tab--collapsed .stake-fab-tab__panel {
  width: 0;
  opacity: 0;
  border-width: 0;
}

/* Each tab item — compact: icon-only, tiny label */
.stake-fab-tab__item {
  padding: 9px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: #c2d4ec;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  position: relative;
  min-height: 52px;
  justify-content: center;
}
.stake-fab-tab__item:hover {
  background: rgba(61, 157, 232, 0.12);
  color: #fff;
}
.stake-fab-tab__item i {
  font-size: 18px;
  color: #3d9de8;
  transition: color 0.2s;
  display: inline-block;
  transform-origin: center;
}
.stake-fab-tab__item:hover i { color: #79bdf0; }

/* === Shake animation — 5 wiggles, then 3s rest, then repeat ===
   Total duration 4.5s split as:
   - 0% to 33%   (~1.5s): five wiggle cycles
   - 33% to 100% (~3s): rest at center
*/
.stake-fab-tab__panel.stake-fab-shake .stake-fab-tab__item i {
  animation: stakeFabShake 4.5s ease-in-out infinite;
}
@keyframes stakeFabShake {
  0%, 33%, 100% { transform: translateX(0) rotate(0); }
  3.33%   { transform: translateX(-3px) rotate(-8deg); }
  6.67%   { transform: translateX(3px)  rotate(8deg);  }
  10%     { transform: translateX(-3px) rotate(-8deg); }
  13.33%  { transform: translateX(3px)  rotate(8deg);  }
  16.67%  { transform: translateX(-3px) rotate(-8deg); }
  20%     { transform: translateX(3px)  rotate(8deg);  }
  23.33%  { transform: translateX(-3px) rotate(-8deg); }
  26.67%  { transform: translateX(3px)  rotate(8deg);  }
  30%     { transform: translateX(-2px) rotate(-5deg); }
}

/* Badge on tab item */
.stake-fab-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  background: #e84a4a;
  border-radius: 50%;
  border: 1.5px solid #071126;
  display: none;
}
.stake-fab-badge--show { display: block; }

.stake-fab-tab__divider {
  height: 1px;
  background: #1a3a6b;
  flex-shrink: 0;
}

/* The toggle handle — slim arrow-only */
.stake-fab-tab__handle {
  background: #0f2a5a;
  border: 1px solid #1a3a6b;
  border-right: none;
  width: 18px;
  border-radius: 5px 0 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #c2d4ec;
  transition: color 0.2s, background 0.2s;
  padding: 16px 0;
  flex-shrink: 0;
}
.stake-fab-tab__handle:hover {
  background: #1b6fd4;
  color: #fff;
}
.stake-fab-tab__chevron {
  font-size: 10px;
  transition: transform 0.3s ease;
}
.stake-fab-tab--collapsed .stake-fab-tab__chevron {
  transform: rotate(180deg);
}
