/*
Theme Name: EBS Corporate Child
Theme URI: https://eb-solutions.ca
Author: EB Solutions
Template: ebs-corporate-theme
Version: 0.1.0
Text Domain: ebs-corporate-child
*/

/* Minimal child theme overrides for quick left-menu prototype preview */
:root {
  --ebs-child-accent: rgba(37,99,235,0.92);
  --ebs-sidebar-width: 84px;
  --ebs-sidebar-expanded: 320px;
  --ebs-sidebar-collapsed: 72px;
}

/* Ensure header inner padding matches main pane for better visual alignment */
.ebs-header__inner {
  padding-top: calc(var(--ebs-space-sm));
  padding-bottom: calc(var(--ebs-space-sm));
}

.ebs-main {
  padding-top: calc(var(--ebs-shell-gap));
  /* default offset for left sidebar */
  margin-left: var(--ebs-sidebar-width);
}

/* Slightly tighter nav labels for compact left column */
.ebs-nav .menu-item > a,
.ebs-nav__item a {
  font-size: 0.98rem;
  line-height: 1.35;
}

/* Ensure long brand hides when collapsed */
.ebs-shell[data-ebs-nav-state="collapsed"] .ebs-brand__logo--long {
  display: none;
}

/* Preserve transparent icon look */
.ebs-brand__logo--icon {
  width: 36px;
  border-radius: 0;
  background: transparent;
}
/* Dark theme preview & simplified multi-level navigation styles */
:root {
  --ebs-bg: #0b1116;
  --ebs-panel: #0f1720;
  --ebs-text: #e6eef6;
  --ebs-muted: #9fb3c8;
  --ebs-accent: rgba(37,99,235,0.92);
}

/* Shell and header */
.ebs-shell { background: var(--ebs-bg); color: var(--ebs-text); }
.ebs-header { background: var(--ebs-panel); border-right: 1px solid rgba(255,255,255,0.04); }

/* Hide legacy single-character icons and rely on labels */
.ebs-nav__icon { display: none !important; }

/* Navigation groups become collapsible sections */
.ebs-nav__group { margin-bottom: 0.75rem; }
.ebs-nav__group-label { display:flex; align-items:center; justify-content:space-between; font-weight:600; color:var(--ebs-muted); cursor:pointer; padding:0.2rem 0.5rem; border-radius:6px; }
.ebs-nav__group-label:after { content: '\25BC'; font-size:0.7rem; opacity:0.7; transition: transform .18s ease; }
.ebs-nav__group.is-expanded .ebs-nav__group-label:after { transform: rotate(180deg); }

.ebs-nav__list { list-style:none; padding:0 0 0 0.25rem; margin:0; }
.ebs-nav__item { margin:0.12rem 0; }
.ebs-nav__item a { display:block; padding:0.55rem 0.65rem; color:var(--ebs-text); text-decoration:none; border-radius:6px; font-size:0.95rem; }
.ebs-nav__item a:hover, .ebs-nav__item.current-menu-item a { background: rgba(255,255,255,0.03); color:#fff; }

/* Collapsed by default unless group contains an active item */
.ebs-nav__group:not(.is-expanded) .ebs-nav__list { display:none; }

/* Branding adjustments */
.ebs-brand__logo--long { display:block; max-width:180px; opacity:0.95; }
.ebs-brand__logo--icon { width:36px; }

/* Responsive adjustments */
@media (max-width: 1080px) {
  .ebs-shell { padding-left: 0; }
  .ebs-nav__group-label:after { content: '\25B6'; }
  .ebs-nav__group.is-expanded .ebs-nav__group-label:after { transform: rotate(90deg); }
}

/* Layout guardrail: keep the nav in a fixed left column so it doesn't overlap content */
.ebs-header {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--ebs-sidebar-width);
  overflow-y: auto;
  z-index: 9999;
  transition: width .18s ease, transform .18s ease;
  background: var(--ebs-panel);
}

.ebs-shell[data-ebs-nav-state='expanded'] .ebs-header { width: var(--ebs-sidebar-expanded); }
.ebs-shell[data-ebs-nav-state='collapsed'] .ebs-header { width: var(--ebs-sidebar-collapsed); }

.ebs-shell[data-ebs-nav-state='expanded'] .ebs-main { margin-left: var(--ebs-sidebar-expanded); }
.ebs-shell[data-ebs-nav-state='collapsed'] .ebs-main { margin-left: var(--ebs-sidebar-collapsed); }

/* Prevent nav content from spilling into main content area */
.ebs-nav__groups { position: relative; }

/* Truncate labels so they don't wrap into narrow columns */
.ebs-nav__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: calc(var(--ebs-sidebar-expanded) - 56px);
}

.ebs-shell[data-ebs-nav-state='collapsed'] .ebs-nav__label { display: none; }
.ebs-shell[data-ebs-nav-state='collapsed'] .ebs-brand__logo--long { display: none; }

/* Accessibility: show readable labels on hover when collapsed */
.ebs-shell[data-ebs-nav-state='collapsed'] .ebs-nav__item a:hover .ebs-nav__label { display: inline-block; position: absolute; left: var(--ebs-sidebar-collapsed); background: rgba(0,0,0,0.6); padding:6px 10px; border-radius:6px; white-space:nowrap; z-index:10001; }

/* Mobile behavior: make sidebar a top horizontal control */
@media (max-width: 768px) {
  .ebs-header { position: relative; width: 100%; height: auto; bottom: auto; z-index: auto; padding-top: 0; }
  .ebs-main { margin-left: 0; }
  .ebs-shell[data-ebs-nav-state='expanded'] .ebs-nav__list { position: absolute; left: 0; top: 56px; width: 100%; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
  .ebs-nav__group-label:after { display: none; }
  .ebs-nav__label { white-space: normal; }
}

/* Enforce pricing grid min widths and readable typography (override parent if needed) */
.wp-block-columns.ebs-pricing-grid,
.ebs-pricing-grid {
  display: grid !important;
  gap: 24px !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  align-items: start;
}

.ebs-pricing-card {
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  line-height: 1.35;
}

/* Make body text in pricing cards more readable and prevent mid-word breaks */
.ebs-pricing-card p,
.ebs-pricing-card h3,
.ebs-pricing-card h4,
.ebs-pricing-card li {
  hyphens: none;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Slightly increase spacing between left menu and page for better breathing room */
.ebs-shell[data-ebs-nav-state='expanded'] .ebs-main { margin-left: var(--ebs-sidebar-expanded); }
.ebs-shell[data-ebs-nav-state='collapsed'] .ebs-main { margin-left: var(--ebs-sidebar-collapsed); }


