/*
GK ProAct brand overrides for the Velzon theme.
Tokens mirror https://gkproact.com (assets/home.css: --hm-*). Load after app.min.css / custom.min.css.
*/

/* Brand constants and theme-independent settings: apply in both light and dark mode */
:root {
    --gk-navy: #0C1F3F;
    --gk-tint: #F6F5FF;
    --gk-tint-2: #ECE9FF;
    --gk-ink: #1F1F1F;
    --gk-ink-2: #555B6A;
    --gk-rule: #E2E3EA;
    --gk-display: 'Red Hat Display', sans-serif;
    --gk-text: 'Open Sans', sans-serif;
    --gk-radius: 16px;

    --vz-font-sans-serif: var(--gk-text);
    --vz-body-font-family: var(--gk-text);
    --vz-border-radius: 8px;
    --vz-border-radius-lg: var(--gk-radius);
}

/* Light mode only. :not([data-bs-theme=dark]) keeps these from overriding Velzon's dark palette,
   since this file loads after it and plain :root would otherwise win in dark mode too. */
:root:not([data-bs-theme=dark]),
[data-bs-theme=light] {
    --gk-violet: #2D00F7;
    --gk-violet-deep: #2300C2;

    --vz-body-color: var(--gk-ink);
    --vz-body-bg: var(--gk-tint);
    --vz-border-color: var(--gk-rule);
    --vz-secondary-color: var(--gk-ink-2);

    --vz-primary: var(--gk-violet);
    --vz-primary-rgb: 45, 0, 247;
    --vz-primary-text-emphasis: var(--gk-violet-deep);
    --vz-primary-bg-subtle: var(--gk-tint-2);
    --vz-primary-border-subtle: #C9C0FF;
    --vz-link-color: var(--gk-violet);
    --vz-link-color-rgb: 45, 0, 247;
    --vz-link-hover-color: var(--gk-violet-deep);
    --vz-link-hover-color-rgb: 35, 0, 194;
}

/* Dark mode: navy-tinted surfaces matching the dark sidebar (#141729), lighter violet for contrast */
[data-bs-theme=dark] {
    --gk-violet: #7B66FF;
    --gk-violet-deep: #9A8CFF;

    --vz-body-bg: #0F1120;
    --vz-body-bg-rgb: 15, 17, 32;
    --vz-body-color: #D9DAE5;
    --vz-body-color-rgb: 217, 218, 229;
    --vz-heading-color: #ECEBF5;
    --vz-secondary-color: #A3A6B8;
    --vz-secondary-color-rgb: 163, 166, 184;
    --vz-secondary-bg: #171A2E;
    --vz-secondary-bg-rgb: 23, 26, 46;
    --vz-tertiary-bg: #1D2138;
    --vz-tertiary-bg-rgb: 29, 33, 56;
    --vz-border-color: #2A2E47;
    --vz-header-bg: #171A2E;
    --vz-header-border: #2A2E47;
    --vz-header-item-bg: #1D2138;
    --vz-topbar-user-bg: #1D2138;
    --vz-footer-bg: #171A2E;
    --vz-input-bg-custom: #1D2138;
    --vz-input-border-custom: #2A2E47;

    --vz-primary: var(--gk-violet);
    --vz-primary-rgb: 123, 102, 255;
    --vz-primary-text-emphasis: var(--gk-violet-deep);
    --vz-primary-bg-subtle: rgba(123, 102, 255, 0.15);
    --vz-primary-border-subtle: rgba(123, 102, 255, 0.4);
    --vz-link-color: var(--gk-violet);
    --vz-link-color-rgb: 123, 102, 255;
    --vz-link-hover-color: var(--gk-violet-deep);
    --vz-link-hover-color-rgb: 154, 140, 255;
}

/* Sidebar: white with a hairline border; the active item is a lavender pill with violet text.
   :root[data-sidebar] matches Velzon's own :root[data-sidebar=…] specificity, so these win by load order
   whichever sidebar colour the theme switcher has stored. */
:root[data-sidebar] {
    --gk-menu-hover-bg: var(--gk-tint);
    --vz-vertical-menu-bg: #FFFFFF;
    --vz-vertical-menu-border: var(--gk-rule);
    --vz-vertical-menu-box-shadow: none;
    --vz-vertical-menu-item-color: var(--gk-ink-2);
    --vz-vertical-menu-item-hover-color: var(--gk-ink);
    --vz-vertical-menu-item-active-color: var(--gk-violet);
    --vz-vertical-menu-item-active-bg: var(--gk-tint-2);
    --vz-vertical-menu-sub-item-color: var(--gk-ink-2);
    --vz-vertical-menu-sub-item-hover-color: var(--gk-ink);
    --vz-vertical-menu-sub-item-active-color: var(--gk-violet);
    --vz-vertical-menu-title-color: #8A8FA0;
    --vz-twocolumn-menu-iconview-bg: var(--gk-tint);
}

/* Dark mode keeps a dark sidebar so it does not glare next to dark content */
[data-bs-theme=dark][data-sidebar] {
    --gk-menu-hover-bg: rgba(255, 255, 255, 0.05);
    --vz-vertical-menu-bg: #141729;
    --vz-vertical-menu-border: #22263D;
    --vz-vertical-menu-item-color: #A3A6B8;
    --vz-vertical-menu-item-hover-color: #fff;
    --vz-vertical-menu-item-active-color: #B3A8FF;
    --vz-vertical-menu-item-active-bg: rgba(123, 102, 255, 0.16);
    --vz-vertical-menu-sub-item-color: #A3A6B8;
    --vz-vertical-menu-sub-item-hover-color: #fff;
    --vz-vertical-menu-sub-item-active-color: #B3A8FF;
    --vz-vertical-menu-title-color: #6E7290;
    --vz-twocolumn-menu-iconview-bg: #1B1F36;
}

/* Pill-shaped top-level items in the full-width sidebar (collapsed icon-only sizes keep Velzon's layout).
   Matches .menu-link, not child combinators: SimpleBar re-parents the <li>s into its own wrapper div. */
[data-sidebar-size=lg] .navbar-menu .navbar-nav .nav-link.menu-link {
    margin: 2px 12px;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
}

[data-sidebar-size=lg] .navbar-menu .navbar-nav .nav-link.menu-link:hover {
    background-color: var(--gk-menu-hover-bg);
}

[data-sidebar-size=lg] .navbar-menu .navbar-nav .nav-link.menu-link.active,
[data-sidebar-size=lg] .navbar-menu .navbar-nav .nav-link.menu-link[aria-expanded=true] {
    background-color: var(--vz-vertical-menu-item-active-bg);
    font-weight: var(--fw-text-strong);
}

.navbar-menu .menu-title {
    letter-spacing: 0.08em;
}

/* Velzon keeps the arrow rotated on the active section even after it is closed (.collapsed.active).
   The arrow should follow open/closed only; aria-expanded=true still rotates it when open. */
.navbar-menu .navbar-nav .nav-link.collapsed.active::after {
    transform: none;
}

/* Sub-items: 14px (the site's small text size), between Velzon's 13px default and the 15px top-level items */
.navbar-menu .navbar-nav .nav-sm .nav-link {
    font-size: var(--fs-text-sm);
}

/* Collapsed (hamburger) sidebar: Velzon fixes the logo box but makes the menu position:absolute, so the
   icons scroll away under the logo. Keep the whole sidebar fixed, as in the expanded layout. Same
   selector specificity as Velzon's rule, so this wins by load order. */
:is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm] .navbar-menu {
    position: fixed;
    top: 0;
    bottom: 0;
}

/* Velzon also forces the whole page to min-height: 1400px when collapsed, to leave room for the
   page-scrolling menu's hover fly-outs. With the menu fixed that only adds empty scroll on short pages. */
:is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm] {
    min-height: 0;
}

/* Logo pair in the sidebar: dark wordmark on the white sidebar, white wordmark in dark mode */
.gk-logo-on-dark {
    display: none;
}

[data-bs-theme=dark] .gk-logo-on-light {
    display: none;
}

[data-bs-theme=dark] .gk-logo-on-dark {
    display: inline-block;
}

/* Typography: same scale as the site (fallback values of the --fs, --lh, --ls and --fw variables in its home.css).
   Weights match the site's declarations; with only Red Hat Display 500+ loaded, 400 headings render at 500 there too. */
:root {
    --fs-heading-xl: 2.125rem;
    --lh-heading-xl: 1.05;
    --ls-heading-xl: -0.02em;
    --fs-heading-lg: 1.75rem;
    --lh-heading-lg: 1.1;
    --ls-heading-lg: -0.02em;
    --fs-heading-md: 1.375rem;
    --lh-heading-md: 1.1;
    --ls-heading-md: -0.01em;
    --fs-heading-sm: 1.125rem;
    --lh-heading-sm: 1.25;
    --fs-text-xl: 1.125rem;
    --lh-text-xl: 1.4;
    --fs-text-md: 1rem;
    --lh-text-md: 1.5;
    --fs-text-sm: 0.875rem;
    --lh-text-sm: 1.4;
    --fw-heading: 400;
    --fw-heading-strong: 500;
    --fw-text: 400;
    --fw-text-strong: 600;

    --vz-body-font-size: var(--fs-text-md);
    --vz-body-line-height: var(--lh-text-md);
    --vz-body-font-weight: var(--fw-text);
}

body {
    font-family: var(--gk-text);
    font-size: var(--fs-text-md);
    line-height: var(--lh-text-md);
    font-weight: var(--fw-text);
}

/* :root prefix outranks Velzon's :is(.h1, …, h6) { font-family: Poppins } */
:root :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6),
.card-title,
.breadcrumb {
    font-family: var(--gk-display);
}

h1, h2, h3,
.h1, .h2, .h3,
.breadcrumb {
    font-weight: var(--fw-heading);
}

/* Velzon hard-codes hkgrotesk / Poppins on these instead of using the body font */
.navbar-menu .navbar-nav .nav-link,
.navbar-menu .navbar-nav .nav-sm .nav-link,
.navbar-menu .menu-title,
.ff-secondary,
.chat-list > li a,
.contact-list li {
    font-family: var(--gk-text);
}

h1, .h1 {
    font-size: var(--fs-heading-xl);
    line-height: var(--lh-heading-xl);
    letter-spacing: var(--ls-heading-xl);
}

h2, .h2 {
    font-size: var(--fs-heading-lg);
    line-height: var(--lh-heading-lg);
    letter-spacing: var(--ls-heading-lg);
}

h3, .h3 {
    font-size: var(--fs-heading-md);
    line-height: var(--lh-heading-md);
    letter-spacing: var(--ls-heading-md);
}

h4, .h4 {
    font-size: var(--fs-heading-sm);
    line-height: var(--lh-heading-sm);
    font-weight: var(--fw-heading-strong);
}

h5, .h5,
.card-title {
    font-size: var(--fs-text-md);
    line-height: var(--lh-text-md);
    font-weight: var(--fw-heading-strong);
}

h6, .h6 {
    font-size: var(--fs-text-sm);
    line-height: var(--lh-text-sm);
    font-weight: var(--fw-heading-strong);
}

small, .small,
.form-text,
.text-muted.small {
    font-size: var(--fs-text-sm);
    line-height: var(--lh-text-sm);
}

b, strong, th,
.fw-semibold,
.form-label {
    font-weight: var(--fw-text-strong);
}

/* Buttons: pill shape and violet primary, as on the site */
.btn {
    border-radius: 999px;
    font-family: var(--gk-text);
    font-weight: var(--fw-heading-strong);
    font-size: var(--fs-text-md);
    line-height: var(--lh-text-md);
}

.btn-sm {
    font-size: var(--fs-text-sm);
    line-height: var(--lh-text-sm);
}

/* GK icon in the subscription card thumbnails, centred by the flex frame around it */
.gk-sub-logo {
    width: 70%;
    height: auto;
}

/* Breadcrumb strip ("Invoices > Details") stays visible under the fixed 70px top bar while scrolling.
   Most templates wrap it in .row > .col-12, and sticky only moves within its parent, so the .row is what
   sticks there; templates without the wrapper make the title box itself sticky. Below the top bar (1002). */
.page-title-box,
.row:has(> .col-12 > .page-title-box) {
    position: sticky;
    top: 70px;
    z-index: 1000;
}

/* Velzon pulls the title box up 23px (margin-top: -23px) to sit flush under the top bar, so when the
   wrapping .row is what sticks, it has to stop 23px lower for the box itself to land at 70px */
.row:has(> .col-12 > .page-title-box) {
    top: calc(70px + 23px);
}

/* Quantity stepper (subscription configs). Velzon lays out direct children in a fixed 37.5px box,
   but our templates wrap them in an htmx <form>, which lost the flex layout; step-primary also
   hard-codes the old #405189 blue. */
.input-step {
    height: auto;
    padding: 4px;
    border-radius: 10px;
    align-items: center;
}

.input-step > form {
    display: flex;
    align-items: center;
    gap: 4px;
}

.input-step button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0 !important;
    font-size: 1.25rem;
    line-height: 1;
    border-radius: 8px;
}

.input-step input {
    width: 3.5em;
    height: 32px;
}

.input-step.step-primary button {
    background-color: var(--vz-primary);
    color: #fff;
}

.input-step.step-primary button:hover {
    background-color: var(--vz-primary-text-emphasis);
}

/* Pagination (e.g. service logs): Velzon hard-codes the active page to its old #405189 blue.
   Primary/link tokens switch per theme, so this covers dark mode too. */
.pagination {
    --vz-pagination-color: var(--vz-body-color);
    --vz-pagination-hover-color: var(--vz-primary);
    --vz-pagination-hover-bg: var(--vz-primary-bg-subtle);
    --vz-pagination-focus-color: var(--vz-primary);
    --vz-pagination-focus-bg: var(--vz-primary-bg-subtle);
    --vz-pagination-focus-box-shadow: 0 0 0 0.2rem rgba(var(--vz-primary-rgb), 0.2);
    --vz-pagination-active-color: #fff;
    --vz-pagination-active-bg: var(--vz-primary);
    --vz-pagination-active-border-color: var(--vz-primary);
}

/* Velzon hard-codes accordion headers to .8125rem; match the body text so expandable rows
   (e.g. configurable subscriptions on My Services) read the same as the rows around them */
.accordion-button {
    font-size: var(--fs-text-md);
}

.btn-icon,
.btn-close,
.input-group > .btn {
    border-radius: var(--vz-border-radius);
}

.btn-primary {
    --vz-btn-bg: var(--gk-violet);
    --vz-btn-border-color: var(--gk-violet);
    --vz-btn-hover-bg: var(--gk-violet-deep);
    --vz-btn-hover-border-color: var(--gk-violet-deep);
    --vz-btn-active-bg: var(--gk-violet-deep);
    --vz-btn-active-border-color: var(--gk-violet-deep);
    --vz-btn-disabled-bg: var(--gk-violet);
    --vz-btn-disabled-border-color: var(--gk-violet);
    --vz-btn-focus-shadow-rgb: var(--vz-primary-rgb);
}

/* Cards and alerts: larger radius, hairline border instead of heavy shadow */
.card {
    --vz-card-border-radius: var(--gk-radius);
    --vz-card-inner-border-radius: calc(var(--gk-radius) - 1px);
    border: 1px solid var(--vz-border-color);
    box-shadow: none;
}

.alert {
    border-radius: 12px;
}

.form-control,
.form-select {
    border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--gk-violet);
    box-shadow: 0 0 0 0.2rem rgba(var(--vz-primary-rgb), 0.15);
}

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
    color: var(--gk-violet);
}

.nav-pills .nav-link.active {
    background-color: var(--gk-violet);
    color: #fff;
}

/* Auth pages use body.bg-primary as a full-page backdrop: the gkproact.com homepage hero blur */
body.bg-primary {
    background: #FFFFFF url("/assets/images/login-bg.webp") center / cover no-repeat fixed !important;
    min-height: 100vh;
}

/* Logo at the top of the login/registration card, above a separator and the form title */
.gk-auth-logo {
    width: 220px;
    max-width: 100%;
    height: auto;
}

.gk-auth-separator {
    /* 40px below the logo; 24px + the title row's mt-2 (8px) = 32px above the title */
    margin: 2.5rem 0 1.5rem;
    border: 0;
    border-top: 1px solid var(--vz-border-color);
    opacity: 1;
}

/* Login / Register title under the separator: a step above the 1.375rem h3 */
.gk-auth-separator ~ .row h3 {
    font-size: 1.5rem;
}

body.bg-primary .card {
    box-shadow: 0 10px 30px rgba(12, 31, 63, 0.08);
}
