/*
 * Yourcloudweb Portal 1.1.2 RC3
 * Responsive layout finetuning. Loaded last to preserve all WHMCS logic.
 */
:root {
  --ycw-rc3-space: clamp(18px, 2.4vw, 36px);
}

/* The client-area content uses the available width, with a consistent left gutter. */
@media (min-width: 1051px) {
  body.ycw-portal:not(.template-login):not(.template-clientregister) .wdes-content > section#header > .container,
  body.ycw-portal:not(.template-login):not(.template-clientregister) .wdes-content > section#main-body > .container,
  body.ycw-portal:not(.template-login):not(.template-clientregister) .wdes-content > section#main-body > .container-fluid,
  body.ycw-portal:not(.template-login):not(.template-clientregister) .wdes-content > section#footer > .container {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  /* Single scroll layer for the sidebar. The outer flex item retains its layout width. */
  body.ycw-portal .wdes-wrapper > .wdes-sidebar {
    position: relative !important;
    top: auto !important;
    align-self: stretch !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  body.ycw-portal .wdes-sidebar > #main-menu {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 1030 !important;
    width: var(--ycw-sidebar) !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #e0e5ec transparent;
    background: #fff !important;
    border-right: 1px solid var(--ycw-line) !important;
  }
  /* Fix RC2's nested fixed rule: navbar scrolls inside #main-menu, not independently. */
  body.ycw-portal .wdes-sidebar > #main-menu > .wdes-nav-side.navbar {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    min-height: 100% !important;
    height: auto !important;
    overflow: visible !important;
    border-right: 0 !important;
    box-shadow: none !important;
  }
}

body.ycw-portal .ycw-discover,
body.ycw-portal .ycw-dashboard {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}
body.ycw-portal .wdes-content #main-body .main-content {
  min-width: 0;
  max-width: 100%;
}
body.ycw-portal .wdes-content .header-lined,
body.ycw-portal .wdes-content .ycw-discover-section-heading,
body.ycw-portal .wdes-content .ycw-dashboard-head {
  text-align: left;
}

/* Notification indicator: small round dot aligned to the bell, not the whole button. */
body.ycw-portal .wdes-sidebar .shortcuts li.wdes-notifications > a {
  position: relative !important;
  isolation: isolate;
}
body.ycw-portal .wdes-sidebar .shortcuts li.wdes-notifications .wdes-notification-alert {
  position: absolute !important;
  top: 8px !important;
  right: calc(50% - 16px) !important;
  left: auto !important;
  display: block !important;
  width: 9px !important;
  min-width: 9px !important;
  max-width: 9px !important;
  height: 9px !important;
  min-height: 9px !important;
  max-height: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  background: #e84252 !important;
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 0 0 1px rgba(232, 66, 82, .12) !important;
  transform: none !important;
  pointer-events: none;
  box-sizing: border-box !important;
}

/* Keep cards evenly spaced and anchors from inheriting odd default alignment. */
body.ycw-portal .ycw-discover-quick-grid,
body.ycw-portal .ycw-discover-products,
body.ycw-portal .ycw-metrics-grid {
  align-items: stretch;
}
body.ycw-portal .ycw-discover-quick-card,
body.ycw-portal .ycw-discover-product {
  min-width: 0;
}
body.ycw-portal .ycw-discover-quick-card .ycw-quick-text,
body.ycw-portal .ycw-discover-product > span {
  text-align: left;
}

@media (min-width: 1051px) and (max-width: 1400px) {
  body.ycw-portal:not(.template-login):not(.template-clientregister) section#main-body {
    padding-right: 26px !important;
    padding-left: 26px !important;
  }
}
@media (max-width: 1050px) {
  /* Existing off-canvas menu remains the sole mobile navigation. */
  body.ycw-portal .wdes-wrapper > .wdes-sidebar {
    position: fixed !important;
    overflow-y: auto !important;
    height: 100vh !important;
    height: 100dvh !important;
  }
  body.ycw-portal .wdes-sidebar > #main-menu,
  body.ycw-portal .wdes-sidebar > #main-menu > .wdes-nav-side.navbar {
    position: static !important;
    height: auto !important;
    min-height: 100% !important;
  }
  body.ycw-portal .wdes-content > section#main-body > .container,
  body.ycw-portal .wdes-content > section#main-body > .container-fluid {
    max-width: none !important;
  }
}
@media (max-width: 767px) {
  body.ycw-portal .ycw-discover-quick-grid,
  body.ycw-portal .ycw-discover-products { grid-template-columns: 1fr; }
  body.ycw-portal .ycw-discover-quick-card { min-height: 0; }
  body.ycw-portal .ycw-discover-section-heading { align-items: flex-start; flex-wrap: wrap; }
  body.ycw-portal .wdes-sidebar .shortcuts li.wdes-notifications .wdes-notification-alert {
    top: 8px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.ycw-portal .ycw-discover-quick-card,
  body.ycw-portal .ycw-discover-product { transition: none !important; }
}
