/**
 * SideWiki - Zendesk Help Center Theme
 * Gemini-inspired design with collapsible side navigation
 */

/* ==========================================================================
   CSS Custom Properties (set via document_head.hbs from manifest settings)
   ========================================================================== */
:root {
  --brand-color: #011842;
  --brand-color-hover: #022a5e;
  --background-color: #ffffff;
  --text-color: #FFFFFF;
  --text-color-secondary: #B0B0B0;
  --text-color-dark: #1e293b;
  --text-color-dark-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 60px;
  --topnav-height: 72px;
  --footer-height: 52px;
  --hover-bg: rgba(255, 255, 255, 0.1);
  --divider-color: rgba(255, 255, 255, 0.2);
  --transition-speed: 0.3s;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: "helvetica-neue-lt-pro", 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--background-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   App Container (Full Layout)
   ========================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background-color: var(--brand-color);
}

/* ==========================================================================
   Sidebar (Full Height - Left Column)
   ========================================================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg-image, linear-gradient(to bottom, #1a3a7a, #011842)) center / cover no-repeat;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--transition-speed) ease;
  overflow: hidden;
  border-right: 1px solid var(--divider-color);
}

/* Sidebar custom scrollbar - consistent appearance */
.sidebar::-webkit-scrollbar,
.sidebar-categories::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-categories::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-categories::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-categories::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Firefox scrollbar */
.sidebar,
.sidebar-categories {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Collapsed State */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .category-name,
.sidebar.collapsed .icon-chevron,
.sidebar.collapsed .icon-chevron-small,
.sidebar.collapsed .section-label,
.sidebar.collapsed .article-label {
  transition: none;
  opacity: 0;
  visibility: hidden;
  width: 0;
}

.sidebar.collapsed .sections-container,
.sidebar.collapsed .articles-container {
  display: none;
}

/* Show category icons when collapsed */
.sidebar.collapsed .category-group {
  display: block;
  margin-bottom: 4px;
}

.sidebar.collapsed .nav-item {
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  gap: 0;
  overflow: hidden;
  display: flex;
}

.sidebar.collapsed .nav-item .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin: 0;
  opacity: 1 !important;
  visibility: visible !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar.collapsed .nav-item .icon-chevron {
  visibility: hidden;
  width: 0;
  margin: 0;
}


/* Sidebar Top Row (Toggle) */
.sidebar-top-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 8px 12px;
  gap: 4px;
  flex-shrink: 0;
}

.sidebar-toggle,
.sidebar-search-btn {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-radius: 24px;
  transition: background-color 0.2s ease;
  color: var(--text-color);
  padding: 12px;
  margin: 0;
  position: relative;
  z-index: 101;
  flex-shrink: 0;
}

.sidebar-toggle .icon,
.sidebar-search-btn .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  pointer-events: none;
}

.sidebar-toggle-label {
  font-size: 15px;
  font-weight: 400;
  margin-left: 12px;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.sidebar-close-label {
  display: none;
  font-size: 15px;
  font-weight: 400;
  margin-left: 12px;
  color: var(--text-color);
  white-space: nowrap;
}

.sidebar-toggle:hover,
.sidebar-search-btn:hover {
  background-color: var(--hover-bg);
  text-decoration: none;
}

.sidebar.collapsed .sidebar-top-row {
  flex-direction: column;
  padding: 8px 6px;
  gap: 8px;
  align-items: center;
}

.sidebar.collapsed .sidebar-toggle {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
}

.sidebar.collapsed .sidebar-toggle-label {
  display: none;
}

/* Sidebar Navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0px 12px 8px 12px;
  gap: 4px;
}

.sidebar.collapsed .sidebar-nav {
  padding: 0px 6px 8px 6px;
  align-items: center;
}

.sidebar.collapsed .sidebar-categories {
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 24px;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  color: var(--text-color);
  min-height: 48px;
  line-height: 0;
  position: relative;
}

.nav-item.active {
  background-color: rgba(255, 255, 255, 0.15);
}

.nav-item .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item:hover {
  background-color: var(--hover-bg);
  text-decoration: none;
}

.nav-item:focus {
  outline: none;
  background-color: transparent;
}

.nav-item:focus.active {
  background-color: rgba(255, 255, 255, 0.15);
}

.nav-item:focus:hover {
  background-color: var(--hover-bg);
}

.nav-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.nav-label {
  transition: opacity 0.15s ease, visibility 0.15s ease;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}

.sidebar.collapsed .nav-label {
  transition: none;
  opacity: 0;
  visibility: hidden;
  width: 0;
  overflow: hidden;
  flex: 0 0 0;
}

/* Sidebar Divider */
.sidebar-divider {
  height: 1px;
  background-color: var(--divider-color);
  margin: 8px 16px;
}

/* Sidebar Categories (Expandable) */
.sidebar-categories {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 12px;
}

.sidebar:not(.collapsed) .sidebar-categories .nav-item {
  width: 100%;
  justify-content: flex-start;
}

.sidebar:not(.collapsed) .sidebar-categories .nav-item .category-name {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.sidebar:not(.collapsed) .sidebar-categories .nav-item .icon-chevron {
  margin-left: auto;
}

.category-group {
  margin-bottom: 4px;
}

.sidebar.collapsed .category-name {
  transition: none;
  opacity: 0;
  visibility: hidden;
  width: 0;
}

.sidebar.collapsed .category-icon {
  width: 24px;
  height: 24px;
  margin-right: 0;
  margin-left: 0;
}

/* Sections container (collapsed by default) */
.sections-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sections-container.expanded {
  max-height: 1000px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 8px 24px;
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
  border-radius: 8px;
  margin: 2px 0;
  width: 100%;
  text-align: left;
  position: relative;
}

.section-label.expandable {
  cursor: pointer;
}

.section-label:hover {
  background-color: var(--hover-bg);
  color: #ffffff !important;
  text-decoration: none !important;
}

.section-label.active,
.section-label[aria-current="page"],
.article-label.active,
.article-label[aria-current="page"] {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
  font-weight: 500;
}

.section-label.active:not(.expandable)::before,
.section-label[aria-current="page"]:not(.expandable)::before,
.article-label.active::before,
.article-label[aria-current="page"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background-color: var(--text-color);
  border-radius: 0 2px 2px 0;
}

.section-label .icon-chevron-small {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  opacity: 0.6;
}

.section-label.expanded .icon-chevron-small {
  transform: rotate(90deg);
}

/* Articles container */
.articles-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.articles-container.expanded {
  max-height: 2000px;
}

.article-label {
  display: block;
  padding: 6px 12px 6px 36px;
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
  border-radius: 8px;
  margin: 2px 0;
  position: relative;
}

.article-label:hover {
  background-color: var(--hover-bg);
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Override global link colors for sidebar - use white text */
.sidebar a,
.sidebar a:visited,
.sidebar a:link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a:active {
  color: #ffffff !important;
  text-decoration: none !important;
}

.sidebar .nav-item,
.sidebar .nav-item:visited,
.sidebar .nav-item:link {
  color: #ffffff !important;
}

/* Contact details nav item - pinned to bottom */
.contact-details-item {
  cursor: pointer;
  margin-top: auto;
  margin-bottom: 4px;
  margin-left: 12px;
  margin-right: 12px;
  position: relative;
  flex-shrink: 0;
}

.contact-details-item button[data-action="contact-details"] {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  opacity: 0.01;
  cursor: pointer;
  border: none;
  background: transparent;
  z-index: 10;
  pointer-events: auto;
  margin: 0;
  padding: 0;
}

/* Sign out nav item */
.sign-out-item {
  margin-bottom: 16px;
  margin-left: 12px;
  margin-right: 12px;
  flex-shrink: 0;
}


/* Collapsed state for bottom nav items */
.sidebar.collapsed .contact-details-item,
.sidebar.collapsed .sign-out-item {
  margin-left: auto;
  margin-right: auto;
  width: 48px;
  height: 48px;
}

.sidebar.collapsed .sign-out-item {
  margin-bottom: 10px;
}

.sidebar.collapsed .contact-details-item .nav-label,
.sidebar.collapsed .sign-out-item .nav-label {
  display: none;
}

/* Floating tooltip — created by JS, appended to <body> so it escapes sidebar overflow */
.sidebar-tooltip {
  position: fixed;
  background-color: rgba(30, 41, 59, 0.95);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.sidebar-tooltip.visible {
  opacity: 1;
}

/* Arrow pointing left (back toward the sidebar icon) */
.sidebar-tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: rgba(30, 41, 59, 0.95);
}

/* Sidebar overlay (mobile drawer backdrop) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 199;
}

.sidebar-overlay.active {
  display: block;
}

/* Mobile hamburger button (hidden by default, shown on mobile) */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--text-color-dark);
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.mobile-nav-toggle:hover {
  background-color: #f1f5f9;
}

/* Sidebar search (mobile only, hidden by default) */
.sidebar-mobile-search {
  display: none;
  padding: 4px 12px 8px;
}

.search-form--sidebar-mobile {
  position: relative;
}

.search-form--sidebar-mobile input[type="search"] {
  width: 100%;
  height: 40px;
  padding: 8px 40px 8px 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.search-form--sidebar-mobile input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.search-form--sidebar-mobile input[type="search"]:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.15);
}

.search-form--sidebar-mobile input[type="submit"],
.search-form--sidebar-mobile button[type="submit"] {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-size: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.55)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
}

/* ==========================================================================
   Main Wrapper (Right Section)
   ========================================================================== */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: margin-left var(--transition-speed) ease;
  background-color: var(--background-color);
  position: relative;
}

/* Home page — lift overflow lock so the window can scroll */
html:has(.home-hero),
body:has(.home-hero) {
  overflow: visible;
}

.main-wrapper:has(.home-hero) {
  height: auto;
  overflow: visible;
}

.main-wrapper:has(.home-hero) .main-content {
  overflow-y: visible;
  flex: none;
}

/* Home page — transparent floating topnav */
.main-wrapper:has(.home-hero) .topnav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  border-bottom: none;
}

.main-wrapper:has(.home-hero) .topnav-center {
  display: none;
}

.main-wrapper:has(.home-hero) .site-footer {
  display: none;
}

/* Prevent any nav item from appearing active on the home page,
   regardless of what Zendesk's link helper or our JS sets */
.app-container:has(.home-hero) .sidebar-nav .nav-item.active,
.app-container:has(.home-hero) .sidebar-nav .nav-item[aria-current="page"] {
  background-color: transparent;
}

.app-container.sidebar-collapsed .main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
}

/* ==========================================================================
   Top Navigation (Right Section Only)
   ========================================================================== */
.topnav {
  height: var(--topnav-height);
  flex-shrink: 0;
  background-color: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color-dark);
}

.topnav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topnav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 16px;
}

.topnav-search {
  width: 100%;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-form--topnav {
  width: 100%;
  position: relative;
  margin: 0;
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.search-form--topnav .search-input,
.search-form--topnav input[type="search"] {
  width: 100%;
  height: 40px;
  padding: 8px 44px 8px 36px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background-color: #f1f5f9;
  color: var(--text-color-dark);
  font-size: 14px;
  box-shadow: none;
}

.search-form--topnav .search-input::placeholder,
.search-form--topnav input[type="search"]::placeholder {
  color: var(--text-muted);
}

.search-form--topnav .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  width: 16px;
  height: 16px;
}

.search-form--topnav input[type="submit"],
.search-form--topnav button[type="submit"] {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background-color: var(--text-muted);
  color: transparent;
  font-size: 0;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2e8f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

.search-form--topnav input[type="submit"]:hover,
.search-form--topnav button[type="submit"]:hover {
  background-color: #64748b;
}

.topnav-left .breadcrumbs {
  margin: 0;
  font-size: 13px;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-link:hover {
  text-decoration: none;
}

.logo {
  height: 32px;
  width: auto;
  display: block;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color-dark);
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Profile Area */
.profile-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 24px;
  transition: background-color 0.2s ease;
  color: var(--text-color-dark);
}

.profile-link:hover {
  background-color: #f1f5f9;
  text-decoration: none;
}

.profile-link::after {
  content: "My Profile";
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 100;
}

.profile-link:hover::after {
  opacity: 1;
}

.profile-name {
  font-weight: 500;
  font-size: 14px;
}

/* Avatar photo in topnav profile link */
.avatar,
.profile-link img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}


/* Buttons — shared base */
.btn,
.btn-signin,
.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Shared teal CTA style */
.btn-primary,
.btn-signin,
.form-submit {
  background-color: #00DCB1;
  color: #001842;
}

.btn-primary:hover,
.btn-signin:hover,
.form-submit:hover {
  background-color: #00C9A0;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 220, 177, 0.35);
}

/* Per-button overrides */
.btn { padding: 10px 20px; }

.btn-primary { color: #001842; }

.btn-signin {
  padding: 8px 16px;
  color: #001842;
}

.signup-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-color-dark);
  text-decoration: none;
  padding: 8px 4px;
}

.signup-link:hover {
  text-decoration: underline;
  color: var(--text-color-dark);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.main-content {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  background-color: var(--background-color);
  color: var(--text-color-dark);
}

/* Home page gets the full gradient background with weave in top corners */
.main-content:has(.home-hero) {
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(to bottom,
    rgba(255, 255, 255, 1.00)  0%,
    rgba(232, 241, 250, 0.52) 15%,
    rgba(89,  148, 234, 0.35) 40%,
    rgba(153, 189, 241, 0.35) 65%,
    rgba(254, 254, 254, 0.58) 100%
  );
}

.main-content:has(.home-hero)::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--weave-image) top left / cover no-repeat;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

/* Ensure home page content sits above the weave background */
.home-hero,
.home-hero-content,
.content-wrapper {
  position: relative;
  z-index: 1;
}

/* Content wrapper for non-article pages */
.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px;
}

/* Default article layout — prose styles apply immediately with no JS needed */
.article {
  width: 100% !important;
  height: auto !important;
  max-width: 860px !important;
  margin: 0 auto !important;
  padding: 40px 48px !important;
  overflow: visible !important;
  position: relative;
}

/* Article header — title + meta */
.article-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: 1.75rem;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: var(--text-color-dark);
  line-height: 1.2;
  margin: 0 0 10px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-color-dark-secondary);
}

.article-meta-divider {
  opacity: 0.4;
}

/* .article--prose is now the default — these keep typography scoped when class is present */
.article.article--prose {
  height: auto !important;
  overflow: visible !important;
  padding: 40px 48px !important;
  max-width: 860px !important;
  margin: 0 auto !important;
}

/* In this article TOC links */
.article-toc-link {
  color: #196AE3;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
}

.article-toc-link:hover {
  text-decoration: underline;
  color: #196AE3;
}

/* Typography — scoped to .article so it applies immediately, no JS needed */
.article h1,
.article h2,
.article h3,
.article h4 {
  color: var(--text-color-dark);
  font-weight: 300;
  letter-spacing: -0.25px;
  line-height: 1.2;
  margin: 1.5em 0 0.5em;
}

.article h1 { font-size: 1.75rem; }
.article h2 { font-size: 1.375rem; }
.article h3 { font-size: 1.125rem; }
.article h4 { font-size: 1rem; }

.article p {
  line-height: 1.7;
  margin: 0 0 1em;
  color: var(--text-color-dark);
}

.article a {
  color: var(--link-color, #1e6fff);
  text-decoration: underline;
}

.article ul,
.article ol {
  padding-left: 1.5em;
  margin: 0 0 1em;
}

.article li {
  line-height: 1.7;
  margin-bottom: 0.25em;
}

/* Step cards — numbered ordered lists */
.article ol {
  list-style: none;
  padding-left: 0;
  margin: 1.5em 0;
  counter-reset: scribe-step;
}

.article ol > li {
  counter-increment: scribe-step;
  position: relative;
  background: #ffffff;
  border: 1px solid #ADCBF4;
  border-radius: 10px;
  padding: 18px 20px 18px 60px;
  margin-bottom: 12px;
  color: var(--text-color-dark);
}

.article ol > li::before {
  content: counter(scribe-step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: #00DCB1;
  color: #001842;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 500;
  line-height: 28px;
  text-align: center;
}

/* Images inside step cards sit flush to edges */
.article ol > li img {
  margin: 12px -4px 4px;
  max-width: calc(100% + 8px);
  border-radius: 6px;
}

.article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  display: block;
  margin: 12px 0;
}

.article pre,
.article code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.875em;
  background: #f1f5f9;
  border-radius: 4px;
}

.article pre {
  padding: 1em;
  overflow-x: auto;
  margin: 1em 0;
}

.article code {
  padding: 0.15em 0.4em;
}

.article blockquote {
  border-left: 3px solid var(--brand-color);
  margin: 1em 0;
  padding: 0.5em 1em;
  color: #64748b;
}

/* ==========================================================================
   Article section cards
   --------------------------------------------------------------------------
   Populated by initArticleSections() in script.js. Each <h2> in an article
   sits BETWEEN cards as a centred heading with divider lines. The content
   that follows each h2 is wrapped in a <section class="cw-section-card">.
   ========================================================================== */

/* Centred section heading with horizontal divider lines on either side */
.article > h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color-dark);
  margin: 40px 0 20px;
  padding: 0 8px;
}
.article > h2::before,
.article > h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
  max-width: 200px;
}
/* First section heading sits closer to the article header */
.article > h2:first-of-type {
  margin-top: 24px;
}

/* The section card itself */
.article > .cw-section-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px 32px;
  margin: 0 0 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.article > .cw-section-card > *:first-child {
  margin-top: 0;
}
.article > .cw-section-card > *:last-child {
  margin-bottom: 0;
}

/* Step cards inside section cards: lighten their background slightly so
   they distinguish from the surrounding section card without competing */
.article > .cw-section-card ol > li {
  background: #fafbfc;
}

/* Mobile: looser breathing room, smaller heading */
@media (max-width: 768px) {
  .article > h2 {
    font-size: 1.125rem;
    margin: 32px 0 16px;
  }
  .article > h2::before,
  .article > h2::after {
    max-width: 60px;
  }
  .article > .cw-section-card {
    padding: 20px 18px;
  }
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  height: var(--footer-height);
  flex-shrink: 0;
  background-color: var(--background-color);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 8px 24px;
  z-index: 50;
  color: var(--text-color-dark);
}

.footer-inner {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: flex-end;
}

.footer-vote {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-vote[hidden] {
  display: none;
}

.footer-vote-label {
  font-size: 13px;
  color: var(--text-color-dark-secondary);
  white-space: nowrap;
}

.footer-vote-buttons {
  display: flex;
  gap: 6px;
}

/* Vote buttons inside the footer — icon-only circular buttons */
.footer-vote-buttons a,
.footer-vote-buttons button,
.footer-vote-buttons .vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: transparent;
  color: var(--text-color-dark-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  font-size: 0; /* hide any leftover text from Zendesk */
}

.footer-vote-buttons a svg,
.footer-vote-buttons button svg,
.footer-vote-buttons .vote-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.footer-vote-buttons a:hover,
.footer-vote-buttons button:hover,
.footer-vote-buttons .vote-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--text-color-dark);
}

.footer-vote-buttons .vote-btn[class*="voted"],
.footer-vote-buttons .vote-btn.is-voted {
  background: var(--brand-color);
  border-color: var(--brand-color);
  color: #fff;
}


/* Loading State */
.main-content.loading {
  opacity: 0.5;
  pointer-events: none;
}

.main-content.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--divider-color);
  border-top-color: var(--text-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ==========================================================================
   Icons
   ========================================================================== */
.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ==========================================================================
   Content Typography
   ========================================================================== */
.page-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--brand-color);
}

.page-description {
  color: var(--text-color-dark-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 800px;
}

/* Category Page Hero */
.category-hero {
  position: relative;
  margin-bottom: 28px;
  padding-bottom: 20px;
  overflow: hidden;
}

.category-hero-content {
  position: relative;
  z-index: 2;
}

.category-hero-wave {
  position: absolute;
  right: -50px;
  bottom: -30px;
  width: 300px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   Content Cards
   ========================================================================== */
/* Shared base: white content containers */
.card,
.request-form-container,
.comment-item,
.comment-form,
.category-section-block {
  background-color: #ffffff;
  border: 1px solid #ADCBF4;
  border-radius: 12px;
}

.card {
  padding: 20px;
  margin-bottom: 16px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}


.card-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.card-description {
  color: var(--text-color-dark-secondary);
  font-size: 14px;
}

/* ==========================================================================
   Home Page Hero
   ========================================================================== */
.home-hero {
  position: relative;
  overflow: hidden;
  /* Full-width within content area using negative margins */
  margin: 0 -40px 24px -40px;
  padding: calc(var(--topnav-height) + 36px) 40px 48px;
  border-radius: 0;
  text-align: center;
  background: transparent;
}

.home-section {
  margin-bottom: 32px;
}

.getting-started-card {
  background-color: #ffffff;
  border: 1px solid #ADCBF4;
  border-radius: 10px;
  padding: 24px 28px;
}

.getting-started-intro {
  font-size: 15px;
  color: var(--text-color-dark-secondary);
  margin-bottom: 16px;
}

.getting-started-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.getting-started-steps li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-color-dark);
  padding-left: 6px;
}

.getting-started-steps li strong {
  color: var(--brand-color);
}

.getting-started-card a {
  color: #196AE3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.getting-started-card a:hover {
  color: #0f4faa;
}

.home-hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
}

.home-hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-color);
  opacity: 0.6;
  margin-bottom: 12px;
}

.home-hero-title {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 8px;
  color: var(--brand-color);
}

.home-hero-subtitle {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-color-dark-secondary);
  line-height: 1.6;
}


.home-search {
  margin: 28px auto 0;
  max-width: 100%;
}

.home-search-inner {
  position: relative;
  background-color: #ffffff;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  border: 1px solid var(--border-color);
}

.home-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.home-search-form {
  margin: 0;
  position: relative;
}

.home-search-form input[type="submit"],
.home-search-form button[type="submit"] {
  display: none;
}

.home-search-form input[type="search"],
.home-search-form .search-input {
  width: 100%;
  border: none;
  padding: 14px 12px 14px 36px;
  font-size: 16px;
  color: var(--text-color-dark);
  background: transparent;
  outline: none;
}

.home-search-form input[type="search"]::placeholder,
.home-search-form .search-input::placeholder {
  color: var(--text-muted);
}

/* Instant search dropdown — shared between home and topnav */
.home-search-form [role="listbox"],
.search-form--topnav [role="listbox"] {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: 0 !important;
  background: #ffffff !important;
  border: 1px solid #ADCBF4 !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 24, 66, 0.10) !important;
  overflow: hidden;
  z-index: 200;
  font-family: "helvetica-neue-lt-pro", 'Helvetica Neue', Arial, sans-serif;
}

.home-search-form [role="option"],
.search-form--topnav [role="option"] {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(173, 203, 244, 0.4);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.home-search-form [role="option"]:last-child,
.search-form--topnav [role="option"]:last-child {
  border-bottom: none;
}

.home-search-form [role="option"]:hover,
.home-search-form [role="option"][aria-selected="true"],
.search-form--topnav [role="option"]:hover,
.search-form--topnav [role="option"][aria-selected="true"] {
  background-color: rgba(173, 203, 244, 0.15);
}

.home-search-form [role="option"] a,
.search-form--topnav [role="option"] a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.home-search-form [role="option"] [data-test-id="search-result-title"],
.home-search-form [role="option"] strong,
.search-form--topnav [role="option"] [data-test-id="search-result-title"],
.search-form--topnav [role="option"] strong {
  color: #196AE3;
  font-weight: 400;
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
}

.home-search-form [role="option"] [data-test-id="search-result-section"],
.home-search-form [role="option"] span:not([data-test-id="search-result-title"]),
.search-form--topnav [role="option"] [data-test-id="search-result-section"],
.search-form--topnav [role="option"] span:not([data-test-id="search-result-title"]) {
  color: #455D86;
  font-size: 12px;
  font-weight: 300;
}

@media (max-width: 640px) {
  .home-hero {
    padding: calc(var(--topnav-height) + 24px) 24px 40px;
    margin-bottom: 0;
  }

  .main-content:has(.home-hero) .content-wrapper {
    padding-top: 16px;
  }

  .home-section {
    margin-bottom: 24px;
  }

  .main-content:has(.home-hero)::before {
    width: 100%;
    height: 25%;
    opacity: 0.35;
  }
}

/* ==========================================================================
   Lists
   ========================================================================== */
.article-list {
  list-style: none;
}

.article-list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.article-list-item:last-child {
  border-bottom: none;
}

.article-list-item a {
  display: block;
  padding: 8px 12px;
  margin: -8px -12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.article-list-item a:hover {
  background-color: #f1f5f9;
  text-decoration: none;
}






/* ==========================================================================
   Search Results
   ========================================================================== */
.search-form {
  margin-bottom: 0;
}

.search-input-wrapper {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  font-size: 16px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--divider-color);
  border-radius: 24px;
  color: var(--text-color);
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.search-input:focus {
  border-color: var(--text-color);
  background-color: rgba(255, 255, 255, 0.15);
}

.search-input::placeholder {
  color: var(--text-color-secondary);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-color-secondary);
}

.search-results-info {
  color: var(--text-color-secondary);
  margin-bottom: 16px;
}

.search-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.search-hero {
  background-color: #ffffff;
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: cover;
  border-radius: 18px;
  padding: 36px 40px 40px;
  color: var(--text-color-dark);
  border: 1px solid var(--border-color);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 0;
  z-index: 6;
  overflow: hidden;
  min-height: 200px;
}

.search-hero-inner {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-color-dark-secondary);
  margin-bottom: 12px;
}

.search-hero-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 8px;
}

.search-hero-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color-dark-secondary);
}

.search-hero-query {
  font-weight: 600;
  color: var(--text-color-dark);
}

.search-hero-form {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.search-form--hero {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.search-form--hero input[type="search"] {
  background-color: #ffffff;
  color: var(--text-color-dark);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  padding: 18px 20px 18px 56px;
  font-size: 18px;
  border-radius: 16px;
  height: 64px;
  width: 100%;
}

.search-form--hero input[type="search"]::placeholder {
  color: var(--text-muted);
}

.search-form--hero .search-icon {
  color: var(--text-muted);
  width: 22px;
  height: 22px;
}

.search-form--hero input[type="submit"],
.search-form--hero button[type="submit"] {
  display: none;
}

.search-results-layout {
  display: block;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  flex: 1 1 auto;
}

.search-results-layout--empty {
  display: block;
}

.search-live-status {
  min-height: 20px;
  font-size: 13px;
  color: var(--text-color-dark-secondary);
  margin-top: -6px;
  margin-bottom: 6px;
  width: 100%;
}

.search-results-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding-top: 8px;
  width: 100%;
  align-items: stretch;
}

.search-results-layout--empty .search-results-main {
  max-width: 720px;
}

.search-results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.search-results-featured {
  width: 100%;
}

.search-results-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-color-dark);
}

.search-results-query {
  font-size: 14px;
  color: var(--text-color-dark-secondary);
}

.search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  align-items: stretch;
}

.search-result-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  width: 100%;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-result-card:hover {
  border-color: #94a3b8;
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.16);
}

.search-result-card:hover .search-result-title a {
  color: var(--brand-color);
}

.search-result-card--featured {
  border-color: rgba(45, 108, 176, 0.35);
  background: linear-gradient(135deg, rgba(240, 248, 255, 0.9), #ffffff 55%);
}

.search-result-card--featured:hover {
  border-color: rgba(1, 24, 66, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.16);
}

.search-result-card-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-badge {
  align-self: flex-start;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #1d4ed8;
  background-color: #dbeafe;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-result-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color-dark);
}

.search-result-title a {
  color: inherit;
  text-decoration: none;
}

/* Stretched link: cover the entire card so clicking anywhere navigates */
.search-result-title a::after {
  position: absolute;
  inset: 0;
  content: '';
  z-index: 1;
}

.search-result-snippet {
  font-size: 14px;
  color: var(--text-color-dark-secondary);
  line-height: 1.6;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-color-dark-secondary);
  font-size: 12px;
  text-transform: capitalize;
}

.search-result-type {
  padding: 4px 10px;
  border-radius: 999px;
  background-color: #f1f5f9;
  color: var(--text-color-dark-secondary);
}

.search-empty {
  padding: 20px 0 40px;
  width: 100%;
}


.search-form--hero .search-results {
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.search-form--hero .search-results li {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
}

.search-form--hero .search-results li:last-child {
  border-bottom: none;
}

.search-form--hero .search-results a {
  color: var(--text-color-dark);
  text-decoration: none;
  font-weight: 500;
}

.search-form--hero .search-results a:hover {
  text-decoration: underline;
}


@media (max-width: 640px) {
  .search-hero {
    padding: 28px 24px 32px;
    min-height: 160px;
  }

  .search-hero-title {
    font-size: 28px;
  }

  .search-results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-result-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-form--hero .search-input,
  .search-form--hero input[type="search"] {
    font-size: 16px;
    height: 56px;
  }
}

/* ==========================================================================
   Request/Ticket Pages
   ========================================================================== */
.request-form {
  max-width: 600px;
}

.form-group,
.form-field {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color-dark);
}

.required-indicator {
  color: #dc2626;
  margin-left: 2px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color-dark);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(1, 24, 66, 0.1);
}

.form-select {
  padding-right: 40px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.form-hint {
  font-size: 13px;
  color: var(--text-color-dark-secondary);
  margin-top: 6px;
}

.form-file {
  font-size: 14px;
  color: var(--text-color-dark);
}

.form-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.request-form-container {
  padding: 24px;
}

.form-submit {
  padding: 12px 24px;
  color: #001842;
  font-weight: 400;
}

/* New Request Form - Override Zendesk styled-components button */
#new-request-form button[type="submit"],
#new-request-form [data-garden-id="buttons.button"],
#new-request-form button[data-test-id="submit-button"],
.new-request-form button[type="submit"] {
  padding: 12px 24px !important;
  background-color: #00DCB1 !important;
  color: #001842 !important;
  border: none !important;
  border-radius: 999px !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

#new-request-form button[type="submit"]:hover,
#new-request-form [data-garden-id="buttons.button"]:hover,
#new-request-form button[data-test-id="submit-button"]:hover,
.new-request-form button[type="submit"]:hover {
  background-color: #00C9A0 !important;
  box-shadow: 0 4px 12px rgba(0, 220, 177, 0.35) !important;
}

#new-request-form button[type="submit"]:focus,
#new-request-form [data-garden-id="buttons.button"]:focus,
#new-request-form button[data-test-id="submit-button"]:focus,
.new-request-form button[type="submit"]:focus {
  outline: 2px solid var(--brand-color) !important;
  outline-offset: 2px !important;
}

#new-request-form button[type="submit"]:disabled,
#new-request-form [data-garden-id="buttons.button"]:disabled,
#new-request-form button[data-test-id="submit-button"]:disabled,
.new-request-form button[type="submit"]:disabled {
  background-color: #94a3b8 !important;
  cursor: not-allowed !important;
}

/* Requests Page */
.requests-filter-nav {
  margin-bottom: 24px;
}

.requests-filter-tabs {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid #ADCBF4;
}

.requests-filter-tab {
  margin-bottom: -1px;
}

.requests-filter-tab a {
  display: block;
  padding: 12px 16px;
  color: var(--text-color-dark-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.requests-filter-tab a:hover {
  color: var(--text-color-dark);
  text-decoration: none;
}

.requests-filter-tab.active a {
  color: #196AE3;
  border-bottom-color: #196AE3;
  font-weight: 400;
}

.requests-info {
  color: var(--text-color-dark-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.request-mobile-meta {
  display: none;
  margin-top: 8px;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.request-closed {
  opacity: 0.7;
}

@media (max-width: 640px) {
  .requests-table th:not(:first-child),
  .requests-table td:not(:first-child) {
    display: none;
  }

  .request-mobile-meta {
    display: flex;
  }

  .request-mobile-meta .request-id,
  .request-mobile-meta .request-date {
    font-size: 13px;
    color: var(--text-color-dark-secondary);
  }
}

.requests-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.requests-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.requests-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.requests-search .form-input {
  padding-left: 40px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 14px;
  color: var(--text-color-dark-secondary);
}

/* Subscribe/Follow */
.subscribe-group {
  display: inline-flex;
  align-items: center;
}

.subscribe-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-color-dark);
}

.subscribe-group input[type="checkbox"] {
  accent-color: var(--brand-color);
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.subscribe-group button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11.5px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color-dark);
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subscribe-group button:hover {
  background-color: #f8fafc;
  border-color: var(--brand-color);
}

/* Requests Table */
.requests-table-container {
  background-color: #ffffff;
  border: 1px solid #ADCBF4;
  border-radius: 12px;
  overflow: hidden;
}

.requests-table {
  width: 100%;
  border-collapse: collapse;
}

.requests-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 400;
  font-size: 13px;
  color: #455D86;
  background-color: rgba(173, 203, 244, 0.15);
  border-bottom: 1px solid #ADCBF4;
}

.requests-table td {
  padding: 16px;
  border-bottom: 1px solid #ADCBF4;
  font-size: 14px;
  color: var(--text-color-dark);
}

.requests-table tr:last-child td {
  border-bottom: none;
}

.requests-table tr:hover {
  background-color: #f8fafc;
}

.request-subject a {
  color: #196AE3;
  font-weight: 400;
}

.request-subject a:hover {
  text-decoration: underline;
}

.request-id,
.request-created,
.request-updated {
  color: var(--text-color-dark-secondary);
}

/* Status Labels */
.status-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-label.status-open,
.status-label.status-new {
  background-color: rgba(173, 203, 244, 0.3);
  color: #196AE3;
}

.status-label.status-pending {
  background-color: rgba(0, 220, 177, 0.15);
  color: #007a63;
}

.status-label.status-solved,
.status-label.status-closed {
  background-color: rgba(69, 93, 134, 0.1);
  color: #455D86;
}

/* Request Detail Page — back nav */
.request-page-nav {
  margin-bottom: 20px;
}

.back-to-requests {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-color-dark-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.back-to-requests:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text-color-dark);
  text-decoration: none;
}

.back-to-requests svg {
  flex-shrink: 0;
}

/* Request Detail Page */
.request-layout {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 32px;
}

@media (max-width: 1200px) {
  .request-layout {
    grid-template-columns: 1fr;
  }

  .request-sidebar {
    order: -1;
  }
}

.request-main {
  min-width: 0;
}

.request-sidebar {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  height: fit-content;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-color-dark);
}

.request-details {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 16px;
  font-size: 14px;
  align-items: start;
}

.request-details dt {
  color: var(--text-color-dark-secondary);
  padding-top: 1px; /* optical baseline alignment with dd text */
}

.request-details dd {
  color: var(--text-color-dark);
  margin: 0;
}

.request-details + .request-details {
  margin-top: 12px;
}

/* Fix form element breaking grid layout */
.request-details form {
  display: contents;
}

.request-details .form-select {
  width: 100%;
}

/* Remove badge styling for status in sidebar */
.request-details .status-label {
  display: inline;
  padding: 0;
  background: none;
  border-radius: 0;
  font-size: inherit;
  font-weight: inherit;
  color: var(--text-color-dark);
}

/* Comment List */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-item {
  padding: 20px;
  margin-bottom: 16px;
}

/* Agent comment: Codeweavers team response — blue tint */
.comment-item--agent {
  background-color: rgba(173, 203, 244, 0.1);
  border-color: #ADCBF4;
  border-left: 4px solid #00DCB1;
  padding-left: 16px;
}

/* External comment: CC'd / forwarded third party — amber tint */
.comment-item--external {
  background-color: #fff7ed;
  border-color: #fed7aa;
  border-left: 4px solid #f59e0b;
  padding-left: 16px;
}

.comment-header {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-avatar {
  flex-shrink: 0;
}

.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-meta {
  display: flex;
  flex-direction: column;
}

.comment-author {
  font-weight: 500;
  color: var(--brand-color);
}

.comment-date {
  font-size: 13px;
  color: var(--text-color-dark-secondary);
}

.comment-body {
  color: var(--text-color-dark);
  line-height: 1.6;
}

.comment-attachments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  list-style: none;
  padding-left: 0;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.attachment-item a {
  color: var(--brand-color);
}

.attachment-size {
  font-size: 12px;
  color: var(--text-color-dark-secondary);
}

/* Comment Form */
.comment-form {
  margin-top: 24px;
  padding: 20px;
}

.comment-form-header {
  display: flex;
  gap: 16px;
}

.comment-form-fields {
  flex: 1;
  min-width: 0;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.comment-upload {
  margin-top: 12px;
}

.comment-expand-btn {
  width: 100%;
  padding: 12px 16px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color-dark-secondary);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.comment-expand-btn:hover {
  background-color: #f1f5f9;
  color: var(--text-color-dark);
}

.comment-editor {
  display: none;
}

.comment-editor.is-visible {
  display: block;
}

.comment-expand-btn.is-hidden {
  display: none;
}

.comment-submit {
  display: none;
}

.comment-submit.is-visible {
  display: inline-block;
  margin-left: auto;
}

.agent-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #00DCB1;
  border-radius: 50%;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-badge .icon-agent {
  width: 12px;
  height: 12px;
  color: #ffffff;
}

.comment-avatar {
  position: relative;
  flex-shrink: 0;
}

.request-collaborators {
  list-style: none;
  padding: 0;
  margin: 0;
}

.request-collaborators li {
  display: inline;
}

.request-collaborators li:not(:last-child)::after {
  content: ", ";
}

.attachment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.attachment-icon {
  flex-shrink: 0;
  color: var(--text-color-dark-secondary);
}

.request-follow-up {
  margin: 24px 0;
}



/* Utility Classes */
.is-hidden {
  display: none !important;
}

.is-visible {
  display: block !important;
}

/* Secondary Button */
.btn-secondary {
  padding: 10px 20px;
  background-color: #f1f5f9;
  color: var(--text-color-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

/* ==========================================================================
   Error Page
   ========================================================================== */
.error-page {
  text-align: center;
  padding: 60px 20px;
}

.error-code {
  font-size: 72px;
  font-weight: 700;
  color: var(--text-color-secondary);
  margin-bottom: 16px;
}

.error-message {
  font-size: 18px;
  color: var(--text-color-secondary);
  margin-bottom: 24px;
}

.error-link {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--hover-bg);
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.error-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

/* ==========================================================================
   Categories Grid (Home Page)
   ========================================================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Shared base: hoverable elevated cards */
.category-card,
.section-card,
.promoted-article-card,
.profile-action-card {
  background-color: #ffffff;
  border: 1px solid #ADCBF4;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-card {
  border-radius: 10px;
  padding: 16px;
}

/* Shared hover */
.category-card:hover,
.section-card:hover,
.promoted-article-card:hover,
.profile-action-card:hover {
  background-color: #f8fafc;
  border-color: #196AE3;
  box-shadow: 0 4px 16px rgba(25, 106, 227, 0.10);
  text-decoration: none;
}

.category-card-title {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: -0.25px;
  margin-bottom: 8px;
}

.category-card-description {
  color: var(--text-color-dark-secondary);
  font-size: 14px;
}

.category-card-meta {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-categories .category-card {
  padding: 22px;
}

.category-card-media {
  width: 100%;
  height: 130px;
  border-radius: 12px;
  background-color: rgba(173, 203, 244, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.category-card-icon {
  width: 44px;
  height: 44px;
  color: #196AE3;
}

/* Section Cards */
.sections-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}


.section-card-content {
  flex: 1;
}

.section-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-color-dark);
}

.section-card-description {
  color: var(--text-color-dark-secondary);
  font-size: 14px;
  margin: 0;
}

.section-card-arrow {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 16px;
}

/* Category Page Sections */
.category-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .category-sections {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .category-sections {
    grid-template-columns: 1fr;
  }
}

.category-section-block {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  padding: 22px;
}


.category-articles-list {
  display: flex;
  flex-direction: column;
}

.category-article-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  text-decoration: none;
  color: var(--text-color-dark);
  transition: color 0.15s ease;
}

.category-article-item:hover {
  color: var(--brand-color);
}

.category-article-title {
  flex: 1;
  font-size: 14px;
}

.category-article-arrow {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.category-article-item:hover .category-article-arrow {
  opacity: 1;
  transform: translateX(2px);
  color: var(--brand-color);
}

.category-section-empty {
  padding: 20px;
  color: var(--text-color-dark-secondary);
  font-size: 14px;
  margin: 0;
}

/* Empty State */
.empty-state {
  text-align: center;
  color: var(--text-color-dark-secondary);
  padding: 40px 20px;
}

/* Promoted Articles Section */
.promoted-articles {
  margin-top: 8px;
}

.section-title {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: var(--text-color-dark);
}

.promoted-articles-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.promoted-articles-grid--two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .promoted-articles-grid--two-col {
    grid-template-columns: 1fr;
  }
}

.promoted-article-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-color-dark);
}


.promoted-article-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--brand-color);
  opacity: 0.7;
}

.promoted-article-title {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
}

.promoted-article-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.promoted-article-card:hover .promoted-article-arrow {
  transform: translateX(4px);
  color: var(--brand-color);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-color-dark-secondary);
  list-style: none;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs a {
  color: var(--text-color-dark-secondary);
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--brand-color);
}

.breadcrumbs-separator {
  color: var(--divider-color);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.pagination li {
  display: inline-flex;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--brand-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(1, 24, 66, 0.3);
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.pagination a:hover {
  border-color: var(--brand-color);
  background-color: var(--brand-color);
  color: #ffffff;
}

/* ==========================================================================
   Community Pages
   ========================================================================== */
.post-item {
  padding: 16px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 12px;
}

.post-title {
  font-weight: 500;
  margin-bottom: 8px;
}

.post-meta {
  color: var(--text-color-secondary);
  font-size: 13px;
}

/* ==========================================================================
   User Profile Page
   ========================================================================== */
.profile-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-hero {
  display: grid;
  grid-template-columns: 96px 1fr 220px;
  gap: 24px;
  align-items: center;
}

.profile-hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar,
.profile-avatar-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
}

.profile-avatar {
  object-fit: cover;
  background-color: #ffffff;
  border: 2px solid var(--border-color);
}

.profile-avatar-placeholder {
  background: radial-gradient(circle at 30% 30%, rgba(1, 24, 66, 0.2), rgba(1, 24, 66, 0.05));
  border: 1px dashed rgba(1, 24, 66, 0.3);
}

.profile-title {
  margin-bottom: 6px;
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.profile-action-link,
.profile-hero-actions a,
.profile-hero-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #ADCBF4;
  background-color: #ffffff;
  color: var(--text-color-dark);
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.profile-action-link:hover,
.profile-hero-actions a:hover,
.profile-hero-actions button:hover {
  border-color: #196AE3;
  background-color: rgba(173, 203, 244, 0.1);
  text-decoration: none;
}

.profile-alias {
  color: var(--text-color-dark-secondary);
  font-size: 13px;
  margin-bottom: 8px;
}

.profile-bio {
  color: var(--text-color-dark-secondary);
  margin-bottom: 12px;
  max-width: 60ch;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-meta-item {
  font-size: 12px;
  color: var(--text-color-dark-secondary);
  background-color: #f1f5f9;
  padding: 4px 8px;
  border-radius: 999px;
}

.profile-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.profile-tag {
  font-size: 12px;
  color: var(--brand-color);
  background-color: rgba(1, 24, 66, 0.08);
  padding: 4px 8px;
  border-radius: 999px;
}

.profile-hero-stats {
  display: grid;
  gap: 10px;
  text-align: right;
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-color-dark-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-stat-value {
  font-weight: 400;
  color: var(--text-color-dark);
  letter-spacing: -0.25px;
}

.profile-section {
  margin-top: 8px;
}

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.profile-section-link {
  font-size: 13px;
  color: var(--brand-color);
  font-weight: 500;
}

.profile-empty {
  color: var(--text-color-dark-secondary);
}

.profile-actions {
  margin-top: 4px;
}

.profile-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.profile-action-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-color-dark);
}



.profile-action-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-action-title {
  font-weight: 400;
  font-size: 15px;
  letter-spacing: -0.25px;
}

.profile-action-meta {
  font-size: 13px;
  color: var(--text-color-dark-secondary);
}

.profile-action-icon {
  width: 28px;
  height: 28px;
  color: #196AE3;
  opacity: 0.8;
  flex-shrink: 0;
}

.profile-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 1024px) {
  .profile-hero {
    grid-template-columns: 72px 1fr;
  }

  .profile-avatar,
  .profile-avatar-placeholder {
    width: 72px;
    height: 72px;
  }

  .profile-hero-stats {
    grid-column: 1 / -1;
    text-align: left;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .profile-hero-media {
    justify-content: flex-start;
  }

  .profile-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
  }

  .profile-action-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

/* ==========================================================================
   Mobile Navigation (≤1024px) — Off-canvas drawer
   ========================================================================== */
@media (max-width: 1024px) {
  /* Sidebar becomes off-canvas drawer, hidden off-screen left by default */
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-speed) ease;
    z-index: 200;
    width: var(--sidebar-width);
    max-width: calc(100vw - 60px);
    box-shadow: none;
    /* Restore solid background on mobile — glass effect doesn't work when overlaying light content */
    background: linear-gradient(to bottom, #1a3a7a, #011842);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  /* Undo desktop collapsed-rail behavior — sidebar is always full-width on mobile */
  .sidebar.collapsed {
    width: var(--sidebar-width);
    transform: translateX(-100%);
  }

  .sidebar.collapsed.mobile-open {
    transform: translateX(0);
  }

  .sidebar.collapsed .nav-label,
  .sidebar.collapsed .category-name,
  .sidebar.collapsed .icon-chevron,
  .sidebar.collapsed .icon-chevron-small,
  .sidebar.collapsed .section-label,
  .sidebar.collapsed .article-label {
    opacity: 1;
    visibility: visible;
    width: auto;
    overflow: visible;
    flex: 1;
  }

  .sidebar.collapsed .sections-container,
  .sidebar.collapsed .articles-container {
    display: block;
  }

  .sidebar.collapsed .nav-item {
    width: auto;
    height: auto;
    min-width: 0;
    max-width: none;
    min-height: 48px;
    max-height: none;
    padding: 12px;
    border-radius: 24px;
    justify-content: flex-start;
    gap: 12px;
  }

  .sidebar.collapsed .sidebar-top-row {
    flex-direction: row;
    padding: 8px 12px;
    gap: 4px;
    align-items: center;
  }

  .sidebar.collapsed .sidebar-toggle {
    width: 100%;
    height: 48px;
    min-width: 0;
    min-height: 48px;
    padding: 12px;
    border-radius: 24px;
    justify-content: flex-start;
  }

  .sidebar.collapsed .sidebar-toggle-label {
    display: block;
  }

  .sidebar.collapsed .sidebar-nav {
    padding: 0px 12px 8px 12px;
    align-items: stretch;
  }

  .sidebar.collapsed .sidebar-categories {
    padding: 8px 12px;
    align-items: stretch;
    flex-direction: column;
  }

  .sidebar.collapsed .contact-details-item,
  .sidebar.collapsed .sign-out-item {
    margin-left: 12px;
    margin-right: 12px;
    width: auto;
    height: auto;
  }

  .sidebar.collapsed .contact-details-item .nav-label,
  .sidebar.collapsed .sign-out-item .nav-label {
    display: block;
  }

  /* Main content fills full width — sidebar overlays it */
  .main-wrapper,
  .app-container.sidebar-collapsed .main-wrapper {
    margin-left: 0;
  }

  /* Swap toggle button labels: "Collapse Sidebar" → "Close" */
  .sidebar-toggle-label { display: none; }
  .sidebar-close-label  { display: block; }

  /* Show hamburger in topnav */
  .mobile-nav-toggle {
    display: flex;
  }

  /* Show search inside sidebar */
  .sidebar-mobile-search {
    display: block;
  }

  /* Hide topnav search bar (search lives in sidebar on mobile) */
  .topnav-center {
    display: none;
  }

  /* Topnav padding adjustments */
  .topnav {
    padding: 0 16px;
    gap: 0;
  }

  /* Content wrapper reduced padding + overflow containment */
  .content-wrapper {
    padding: 24px 20px;
    overflow-x: hidden;
  }

  /* Constrain the Zendesk React form container */
  #new-request-form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden;
  }

  /* Reset min-widths on all descendants so the form can be responsive */
  #new-request-form * {
    min-width: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* WYSIWYG toolbar: allow buttons to wrap rather than force width */
  #new-request-form [role="toolbar"],
  #new-request-form [class*="toolbar"],
  #new-request-form [class*="Toolbar"] {
    flex-wrap: wrap !important;
    overflow-x: auto;
  }

  /* Preserve images/icons inside the form */
  #new-request-form img,
  #new-request-form svg {
    max-width: none;
  }

  /* Home hero negative margins adjust to match reduced padding */
  .home-hero {
    margin: 0 -20px 24px -20px;
    padding: calc(var(--topnav-height) + 32px) 40px 48px;
  }

  .main-content:has(.home-hero)::before {
    width: 100%;
    height: 30%;
    opacity: 0.45;
  }
}
