/* ==========================================================================
   VastuEasy — Marketing shell styles
   ==========================================================================
   Consumes tokens.css only (design-spec.md §10). Covers: layout container,
   buttons, nav, footer, and the dormant §7 auth/usage components shared by
   every shell page. Page-specific section styling lives inline in each page
   (matching the .dc.html reference approach) or in a small <style> block at
   the top of that page.
   ========================================================================== */

/* ---------------------------------------------------------------- layout */

.vc-container {
  max-width: var(--vc-max-width);
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 600px) {
  .vc-container { padding: 0 20px; }
}

/* --------------------------------------------------------------- buttons */

.vc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 24px;
  border-radius: var(--vc-radius-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vc-btn-primary {
  background: var(--vc-primary);
  color: var(--vc-bg);
}
.vc-btn-primary:hover { background: var(--vc-primary-dark); color: var(--vc-bg); }
.vc-btn-primary:active { background: var(--vc-primary-darker); }
.vc-btn-primary[disabled], .vc-btn-primary.is-disabled { opacity: 0.45; pointer-events: none; }
.vc-btn[hidden] { display: none; }

.vc-btn-ghost {
  background: transparent;
  color: var(--vc-primary-dark);
  border: 1.5px solid var(--vc-panel-border);
}
.vc-btn-ghost:hover { background: var(--vc-primary-tint); color: var(--vc-primary-dark); }
.vc-btn-ghost:active { background: var(--vc-primary-tint-pressed); }

.vc-btn-lg { padding: 14px 30px; font-size: 16px; }
.vc-btn-sm { padding: 8px 18px; font-size: 14px; min-height: 36px; }

.vc-link-arrow { font-weight: 500; font-size: 15px; }

/* ------------------------------------------------------------------- nav */

.vc-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--vc-nav-height);
  padding: 0 40px;
  background: var(--vc-bg);
  border-bottom: 1px solid var(--vc-divider);
  font-family: var(--vc-font-body);
}

.vc-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--vc-text);
  text-decoration: none;
  flex-shrink: 0;
}
.vc-nav-wordmark {
  font-family: var(--vc-font-heading);
  font-weight: 560;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.vc-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}

.vc-nav-link {
  color: var(--vc-text-medium);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.vc-nav-link:hover { color: var(--vc-primary-dark); }
.vc-nav-link.active {
  color: var(--vc-primary-dark);
  border-bottom-color: var(--vc-primary);
}

/* Account slot (design-spec.md §4, §7.4) — Log In / Hi, {name} + Log Out,
   filled in by site-shell.js once vc-auth.js resolves. [hidden] is just the
   pre-resolve fallback, not a permanent dormant flag.

   min-width reserves this slot's full logged-in footprint (Hi, {name} + Log
   Out + Demo + Sample Demo — measured ~474px for a short name) from the
   very first paint, while [hidden] keeps it invisible via visibility rather
   than display:none. Without this, the slot went from zero width straight
   to ~470px+ the instant auth resolved, shoving "Analyze My Space" (and
   everything after this slot) sideways by that much with no warning — a
   visitor who moved to click something during that reflow could land on
   Log Out instead. Reserving the space up front means resolving auth only
   ever swaps content inside a box that was already there; nothing to its
   right moves. */
.vc-nav-account { display: flex; align-items: center; gap: 10px; min-width: 500px; justify-content: flex-end; }
.vc-nav-account[hidden] { display: flex; visibility: hidden; pointer-events: none; }
/* Sits between the nav links and Log Out, so it needs to read as identity
   rather than a control that lost its border. The rule gives it a boundary
   without making it look clickable. */
.vc-nav-welcome {
  font-size: 14px;
  color: var(--vc-text-medium);
  white-space: nowrap;
  padding-left: 14px;
  border-left: 1px solid var(--vc-divider);
}
.vc-nav-welcome[hidden] { display: none; }

.vc-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--vc-text);
}

@media (max-width: 900px) {
  .vc-nav { padding: 0 20px; gap: 16px; }
  .vc-nav-toggle { display: flex; order: 2; }
  .vc-nav-links {
    display: none;
    position: fixed;
    inset: var(--vc-nav-height) 0 0 0;
    height: calc(100dvh - var(--vc-nav-height));
    margin-left: 0;
    background: var(--vc-bg);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    overflow-y: auto;
  }
  .vc-nav-links.is-open { display: flex; }
  .vc-nav-link {
    min-height: 56px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--vc-divider);
    padding: 0;
  }
  .vc-nav-link.active { border-bottom: 1px solid var(--vc-divider); }
  /* The 500px desktop min-width would force horizontal overflow in this
     narrower, vertically-stacked sheet — not needed here anyway, since a
     column layout's own content height already reserves its vertical space
     (the [hidden] visibility fix above still holds), so drop it back to 0. */
  .vc-nav-account { order: 8; padding: 16px 0; min-width: 0; justify-content: flex-start; }
  .vc-nav-cta { order: 9; margin-top: auto; width: 100%; text-align: center; }
}

/* ---------------------------------------------------------------- footer */

.vc-footer {
  background: var(--vc-bg-alt);
  border-top: 1px solid var(--vc-divider);
  padding: 56px 40px 32px;
  font-family: var(--vc-font-body);
  color: var(--vc-text);
}

.vc-footer-grid {
  max-width: var(--vc-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.vc-footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.vc-footer-brand span {
  font-family: var(--vc-font-heading);
  font-weight: 560;
  font-size: 17px;
}
.vc-footer-desc { font-size: 14px; line-height: 1.6; color: var(--vc-text-medium); margin: 0; max-width: 26em; }

.vc-footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.vc-footer-heading {
  font-weight: 600;
  color: var(--vc-text-muted);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.vc-footer-link { color: var(--vc-text-medium); text-decoration: none; }
.vc-footer-link:hover { color: var(--vc-primary-dark); }

.vc-footer-bottom {
  max-width: var(--vc-max-width);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--vc-divider);
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--vc-text-light);
}
.vc-footer-bottom a { color: var(--vc-text-light); text-decoration: none; }
.vc-footer-bottom a:hover { color: var(--vc-primary-dark); }

@media (max-width: 900px) {
  .vc-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .vc-footer { padding: 40px 20px 24px; }
  .vc-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .vc-footer-bottom { flex-wrap: wrap; }
}

/* ------------------------------------------------------- breadcrumb bar */
/* Tool route only (design-spec.md §5.2, §6) */

.vc-breadcrumb {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 40px;
  border-bottom: 1px solid var(--vc-divider);
  font-size: 14px;
  gap: 8px;
}
.vc-breadcrumb a { color: var(--vc-text-muted); }
.vc-breadcrumb .vc-breadcrumb-sep { color: var(--vc-text-light); }
.vc-breadcrumb .vc-breadcrumb-current { color: var(--vc-text-medium); }
.vc-breadcrumb-right { margin-left: auto; }

@media (max-width: 600px) {
  .vc-breadcrumb { padding: 0 20px; }
}

/* -------------------------------------------------- usage-limit badge -- */
/* Dormant — design-spec.md §7.1. Hidden at launch via [hidden]; reserved
   space in the breadcrumb bar so switching it on later shifts nothing. */

.vc-usage-badge { display: flex; align-items: center; gap: 10px; }
.vc-usage-badge[hidden] { display: none; }
.vc-usage-badge-segs { display: flex; gap: 3px; }
.vc-usage-badge-seg { width: 14px; height: 8px; border-radius: 3px; background: var(--vc-divider); display: inline-block; }
.vc-usage-badge-seg.is-filled { background: var(--vc-primary); }
.vc-usage-badge-text { font-size: 14px; color: var(--vc-text-muted); }
.vc-usage-badge-text.is-near-cap { color: var(--vc-primary-dark); }
.vc-usage-badge-upgrade { font-size: 14px; font-weight: 500; }

@media (max-width: 600px) {
  .vc-usage-badge-text .vc-usage-badge-text-full { display: none; }
}

/* ------------------------------------------------------------ cap banner */
/* Dormant — design-spec.md §7.2. Same component doubles for the
   awaiting-approval message (icon + copy swap, no buttons). */

.vc-status-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 40px;
  border-bottom: 1px solid var(--vc-panel-border);
  font-size: 15px;
}
.vc-status-banner[hidden] { display: none; }
.vc-status-banner-cap { background: var(--vc-primary-tint); }
.vc-status-banner-awaiting { background: var(--vc-accent-tint); }
.vc-status-banner-text { color: var(--vc-text-medium); }
.vc-status-banner-actions { display: flex; gap: 10px; margin-left: auto; }

@media (max-width: 600px) {
  .vc-status-banner { padding: 12px 20px; flex-wrap: wrap; }
  .vc-status-banner-actions { width: 100%; margin-left: 0; }
  .vc-status-banner-actions .vc-btn { flex: 1; }
}

/* ------------------------------------------------------- upgrade modal */
/* Dormant — design-spec.md §7.3. One treatment for both upgrade-required
   and awaiting-approval (swap copy/icon); never stacked with the banner. */

.vc-modal-scrim {
  position: fixed;
  inset: 0;
  background: var(--vc-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.vc-modal-scrim[hidden] { display: none; }
.vc-modal-panel {
  background: var(--vc-panel);
  border-radius: var(--vc-radius);
  box-shadow: var(--vc-shadow-modal);
  padding: 34px 36px;
  max-width: 420px;
  width: 100%;
  font-family: var(--vc-font-body);
}
.vc-modal-panel h3 { margin: 0 0 10px; }
.vc-modal-panel p { margin: 0 0 18px; }
.vc-modal-meter { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.vc-modal-actions { display: flex; gap: 12px; align-items: center; }
.vc-modal-dismiss { font-size: 15px; font-weight: 500; color: var(--vc-text-muted); cursor: pointer; padding: 11px 12px; background: none; border: none; }
.vc-modal-dismiss:hover { color: var(--vc-primary-dark); }

/* ------------------------------------------------------------------ misc */

.vc-tool-microfooter {
  border-top: 1px solid var(--vc-divider);
  padding: 16px 40px;
  font-size: 13px;
  color: var(--vc-text-light);
  display: flex;
  gap: 24px;
}
.vc-tool-microfooter a { color: var(--vc-text-light); }
.vc-tool-microfooter a:hover { color: var(--vc-primary-dark); }

@media (max-width: 600px) {
  .vc-tool-microfooter { padding: 14px 20px; }
}
