/* layout.css â Sidebar, Header mobile, Footer */

/* ââ App Shell ââ */
#app {
  display: flex;
  min-height: 100vh;
  background: var(--background);
}

/* ââ Sidebar (desktop â¥1024px) â floating widget ââ */
.sidebar {
  display: none;
}
@media (min-width: 1024px) {
  /* Crop wrapper â clipa border-radius, controla posiÃ§Ã£o e shadow */
  .sidebar-crop {
    position: fixed;
    top: 1rem;
    left: 1rem;
    bottom: 1rem;
    width: var(--sidebar-w);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
    z-index: 40;
    transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
  }
  .sidebar-crop--collapsed { width: 4rem; }
  /* Sidebar preenche o crop wrapper completamente */
  .sidebar {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: var(--card);
    border: 1px solid rgba(0,0,0,0.07);
    overflow: hidden;
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
}
[data-theme="dark"] .sidebar {
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 8px 40px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.25);
}

.sidebar__brand {
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}
.sidebar__brand-inner {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
    flex: 1;
  }
  .sidebar__logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
  }
  .sidebar__brand-linkedin {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    color: var(--muted-foreground);
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
    vertical-align: middle;
  }
  .sidebar__brand-linkedin:hover {
    opacity: 1;
    color: #0a66c2;
  }
.sidebar__logo-badge {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.sidebar__logo-img {
  height: 2.25rem;
  width: auto;
  object-fit: contain;
}
.sidebar__brand-text { min-width: 0; overflow: hidden; transition: opacity 0.2s, max-width 0.25s; }
.sidebar__brand-name { font-size: 0.875rem; font-weight: 700; color: var(--foreground); white-space: nowrap; }
.sidebar__brand-sub  { font-size: 0.7rem; color: var(--muted-foreground); white-space: nowrap; }

/* Collapse button */
.sidebar__collapse-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.25s;
}
.sidebar__collapse-btn:hover { background: var(--surface); color: var(--foreground); }
.sidebar--collapsed .sidebar__collapse-btn { transform: rotate(180deg); }

/* Collapsed state â hide text */
.sidebar--collapsed .sidebar__brand-text,
.sidebar--collapsed .sidebar__profile,
.sidebar--collapsed .sidebar__search,
.sidebar--collapsed .sidebar__nav-label,
.sidebar--collapsed .sidebar__nav a span,
.sidebar--collapsed .sidebar__nav a .nav-chevron,
.sidebar--collapsed .sidebar__bottom .sidebar__wa-btn span,
.sidebar--collapsed .sidebar__bottom-bar,
.sidebar--collapsed .sidebar__links {
  display: none;
}
.sidebar--collapsed .sidebar__nav a {
  justify-content: center;
  padding: 0.625rem;
}
.sidebar--collapsed .sidebar__nav {
  padding: 0.75rem 0.5rem;
}
.sidebar--collapsed .sidebar__brand {
  justify-content: center;
}
.sidebar--collapsed .sidebar__brand a {
  pointer-events: none;
}
.sidebar--collapsed .sidebar__bottom {
  padding: 0.75rem 0.5rem;
  align-items: center;
}
.sidebar--collapsed .sidebar__wa-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  justify-content: center;
  border-radius: 0.625rem;
}

.sidebar__profile {
  padding: 0.75rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar__stats {
  display: flex;
  gap: 0.5rem;
  text-align: center;
  margin-bottom: 0.625rem;
}
.sidebar__stat { flex: 1; }
.sidebar__stat-val { font-size: 0.8125rem; font-weight: 800; color: var(--foreground); }
.sidebar__stat-lbl { font-size: 0.6875rem; color: var(--muted-foreground); }
.sidebar__headline {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.375rem;
}
.sidebar__location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.sidebar__location-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(74,222,128,0.25);
}

.sidebar__nav { flex: 1; padding: 0.75rem 0.75rem; overflow-y: auto; overflow-x: visible; scrollbar-width: none; }
.sidebar__nav::-webkit-scrollbar { display: none; }
.sidebar__nav-label {
  padding: 0 0.625rem;
  margin-bottom: 0.375rem;
  margin-top: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(107,117,128,0.55);
}
.sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: 0.75rem;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 0.125rem;
}
.sidebar__nav a:hover { color: #fff; background: var(--primary); }
.sidebar__nav a.active {
  background: #111;
  color: #fff;
  font-weight: 600;
}
[data-theme="dark"] .sidebar__nav a.active { background: #f0f0f0; color: #111; }
[data-theme="dark"] .sidebar__nav a:hover { background: var(--primary); color: #fff; }
.sidebar__nav a svg { flex-shrink: 0; }
.sidebar__nav a .nav-chevron { margin-left: auto; opacity: 0.5; }

.sidebar__bottom {
  padding: 0.875rem 0.75rem 0.875rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}
.sidebar__wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: #111;
  color: #fff;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: background 0.15s;
}
.sidebar__wa-btn:hover { background: var(--primary); }
[data-theme="dark"] .sidebar__wa-btn { background: #f0f0f0; color: #111; }
[data-theme="dark"] .sidebar__wa-btn:hover { background: #fff; }

/* Language switcher slot na sidebar */
.sidebar__lang-slot { overflow: visible; }

.sidebar__links {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 0.375rem;
  border-top: 1px solid var(--border);
}
.sidebar__icon-link {
  padding: 0.5rem;
  color: var(--muted-foreground);
  transition: color 0.15s, background 0.15s;
  border-radius: 0.5rem;
}
.sidebar__icon-link:hover { color: var(--foreground); background: var(--surface); }

/* ââ Main content area ââ */
.main-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
@media (min-width: 1024px) {
  /* Efeito de "crop fixo" â frame imÃ³vel na tela, conteÃºdo rola dentro */
  .main-wrapper {
    position: fixed;
    top: 1rem;
    right: 1rem;
    bottom: 1rem;
    left: calc(var(--sidebar-w) + 2rem);
    margin: 0;
    background: var(--card);
    border-radius: 1.25rem;
    overflow-y: overlay; /* scrollbar flutua sobre o conteÃºdo, sem ocupar espaÃ§o no layout */
    overflow-x: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
  }
  .main-wrapper::-webkit-scrollbar { width: 5px; background: transparent; }
  .main-wrapper::-webkit-scrollbar-track { background: transparent; margin-block: 1.25rem; }
  .main-wrapper::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 5px; }
  .main-wrapper::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.28); }
}



/* ââ Sidebar collapsed â tooltips âââââââââââââââââââ */
.sidebar--collapsed .sidebar__nav a { position: relative; }
.sidebar--collapsed .sidebar__nav a[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 0.625rem);
  top: 50%;
  transform: translateY(-50%);
  background: #111;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3125rem 0.75rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.sidebar--collapsed .sidebar__nav a[data-tooltip]:hover::after { opacity: 1; }

/* ââ Mobile Header â floating glass pill ââ */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.125rem;
    background: rgba(12,12,18,0.58);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    position: fixed;
    top: 0.1875rem;
    left: 1rem;
    right: 1rem;
    z-index: 60;
    box-shadow: 0 4px 20px rgba(0,0,0,0.40), 0 1px 3px rgba(0,0,0,0.25);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .mobile-header--hidden {
      opacity: 0;
      pointer-events: none;
      transform: translateY(-110%);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
  [data-theme="dark"] .mobile-header {
    background: rgba(8,8,14,0.58);
    border-color: rgba(255,255,255,0.14);
    box-shadow: 0 4px 20px rgba(0,0,0,0.50), 0 1px 3px rgba(0,0,0,0.3);
  }
@media (min-width: 1024px) { .mobile-header { display: none; } }

/* Compensa a altura do header fixo para que o conteÃºdo nÃ£o fique sob ele */
@media (max-width: 1023px) {
    .main-wrapper {
      padding-top: calc(56px + 1.125rem);
    }
    /* CriaÃ§Ã£o de Sites: topbar ocupa o topo â sem padding de compensaÃ§Ã£o */
  body.has-location-bar .main-wrapper,
  body:has(.cs-location-bar) .main-wrapper {
      padding-top: 0;
    }
  }

.mobile-header__brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
  }
.mobile-header__name {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
}
.mobile-logo-badge {
  width: 2.375rem !important;
  height: 2.375rem !important;
  border: none !important;
}
.mobile-header__actions { display: flex; align-items: center; gap: 0.5rem; }
.mobile-header__menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: rgba(255,255,255,0.70);
    transition: color 0.15s, background 0.15s;
    border-radius: var(--radius);
    line-height: 0;
  }
  .mobile-header__menu-btn svg { display: block; }
  .mobile-header__menu-btn:hover { color: #ffffff; background: rgba(255,255,255,0.10); }
/* mobile-drawer: fixed overlay, oculto por padrao para nao bloquear
   eventos ou criar compositing layer quando fechado. Desktop: display:none. */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 59;
  pointer-events: none;
}
@media (min-width: 1024px) {
  .mobile-drawer { display: none !important; }
}
.mobile-drawer.open { pointer-events: auto; }
.mobile-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26,42,58,0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.mobile-drawer.open .mobile-drawer__backdrop {
  opacity: 1;
  pointer-events: auto;
}
.mobile-drawer__panel {
  position: absolute;
  top: calc(56px + 0.625rem);
  left: 1rem;
  right: 1rem;
  overflow-y: auto;
  background: rgba(12,12,18,0.82);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.mobile-drawer.open .mobile-drawer__panel { transform: translateY(0); opacity: 1; }
.mobile-drawer__nav { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-drawer__nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  transition: background 0.15s, color 0.15s;
  border-radius: var(--radius-xl);
}
.mobile-drawer__nav a:hover { color: #fff; background: rgba(255,255,255,0.10); }
.mobile-drawer__nav a.active { background: rgba(255,255,255,0.13); color: #fff; font-weight: 600; }

/* Language slot no mobile drawer */
.mobile-drawer__lang-slot { }

.mobile-drawer__wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: background 0.15s;
}
.mobile-drawer__wa:hover { background: var(--accent); }

/* ââ Footer ââ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.site-footer__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 4em 1em;
}
.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr auto auto; }
}
.site-footer__logo { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.75rem; }
.site-footer__logo-badge {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.site-footer__logo-img { height: 2rem; width: auto; object-fit: contain; }
.site-footer__logo span { font-weight: 600; color: var(--foreground); font-size: 0.875rem; }
.site-footer__tagline { font-size: 0.75rem; color: var(--muted-foreground); max-width: 18rem; line-height: 1.6; }
.site-footer__links-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.site-footer__links-row a { font-size: 0.75rem; color: var(--muted-foreground); transition: color 0.15s; }
.site-footer__links-row a:hover { color: var(--primary); }
.site-footer__col-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); margin-bottom: 0.75rem; }
.site-footer__col a { display: block; font-size: 0.75rem; color: var(--muted-foreground); margin-bottom: 0.5rem; transition: color 0.15s; }
.site-footer__col a:hover { color: var(--foreground); }
.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 640px) { .site-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.site-footer__bottom p { font-size: 0.75rem; color: var(--muted-foreground); }

  /* ââ Theme Toggle ââ */
  .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted-foreground);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
  }
  .theme-toggle:hover { background: var(--surface-2); color: var(--foreground); }

  /* ââ Sidebar Search ââ */
  .sidebar__search {
    width: 100%;
    padding: 0.75rem 0.75rem 0.5rem;
    box-sizing: border-box;
  }
  .sidebar__search-form {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.3125rem 0.75rem;
    transition: border-color 0.15s;
  }
  .sidebar__search-form:focus-within { border-color: var(--muted-foreground); }
  .sidebar__search-form svg { flex-shrink: 0; color: var(--muted-foreground); }
  .sidebar__search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.8125rem;
    color: var(--foreground);
    outline: none;
    min-width: 0;
  }
  .sidebar__search-input::placeholder { color: var(--muted-foreground); }

  /* ââ Mobile Drawer Search ââ */
  .mobile-drawer__search {
    padding: 0.875rem 1.25rem 0.5rem;
  }
  .mobile-drawer__search-form {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1rem;
    transition: border-color 0.15s;
  }
  .mobile-drawer__search-form:focus-within { border-color: rgba(255,255,255,0.35); }
  .mobile-drawer__search-form svg { flex-shrink: 0; color: rgba(255,255,255,0.55); }
  .mobile-drawer__search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    color: #fff;
    outline: none;
    min-width: 0;
  }
  .mobile-drawer__search-input::placeholder { color: rgba(255,255,255,0.45); }

  /* sidebar__bottom-bar: espaÃ§amento gerenciado pelo gap e padding do .sidebar__bottom */

  /* ââ Mobile header theme toggle ââ */
  .mobile-header__actions .theme-toggle { border: none; background: transparent; }
  


  /* Location bar da pÃ¡gina criacao-de-sites â empurra o cabeÃ§alho flutuante para baixo */
  @media (max-width: 1023px) {
    body.has-location-bar .mobile-header {
        top: 2rem;
    }
    body.has-location-bar .main-wrapper {
      padding-top: calc(2.5rem + 0.75rem + 56px + 1.25rem);
    }
  }