/*
 * KZD Solutions branding overrides.
 * Loaded after huraga.css so it cascades on top without touching the
 * compiled theme build. Maps the kzdsolutions-website design tokens
 * onto Bootstrap 5.3's CSS custom properties, which Huraga is built on.
 * Source of truth for these values: kzdsolutions-website/css/style.css
 */

:root,
[data-bs-theme=light] {
  --bs-primary: #2946f3;
  --bs-primary-rgb: 41, 70, 243;
  --bs-primary-text-emphasis: #101d61;
  --bs-primary-bg-subtle: #dde3fd;
  --bs-primary-border-subtle: #aab7fa;

  --bs-link-color: #2946f3;
  --bs-link-color-rgb: 41, 70, 243;
  --bs-link-hover-color: #1c31c2;
  --bs-link-hover-color-rgb: 28, 49, 194;

  --bs-border-radius: 0.5rem;
  --bs-border-radius-sm: 0.375rem;
  --bs-border-radius-lg: 0.75rem;
  --bs-border-radius-xl: 1.25rem;
  --bs-border-radius-2xl: 2rem;
  --bs-border-radius-pill: 999px;

  --bs-box-shadow: 0 20px 45px rgba(17, 24, 39, .08);
  --bs-box-shadow-sm: 0 4px 12px rgba(17, 24, 39, .04);
  --bs-box-shadow-lg: 0 28px 55px rgba(17, 24, 39, .12);

  --kzd-navy: #000d51;
  --kzd-accent-purple: #6b21a8;
  --kzd-accent-purple-light: #9f5cff;
}

[data-bs-theme=dark] {
  --bs-primary: #6a83ff;
  --bs-primary-rgb: 106, 131, 255;
  --bs-primary-text-emphasis: #b7c3ff;
  --bs-primary-bg-subtle: #1a2050;
  --bs-primary-border-subtle: #33408f;

  --bs-link-color: #6a83ff;
  --bs-link-color-rgb: 106, 131, 255;
  --bs-link-hover-color: #8fa0ff;
  --bs-link-hover-color-rgb: 143, 160, 255;

  --kzd-navy: #b9c3ff;
  --kzd-accent-purple: #b088e0;
  --kzd-accent-purple-light: #c9a3ff;
}

.btn {
  transition: all .25s ease;
}

.btn-primary {
  --bs-btn-hover-transform: translateY(-2px);
}

.btn-primary:hover,
.btn-primary:active {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(41, 70, 243, .25);
}

.kzd-brand-name {
  font-weight: 600;
  letter-spacing: -.01em;
}

.card {
  box-shadow: var(--bs-box-shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Auth pages (login / signup / password reset): split layout with a branded side panel */
.kzd-auth-wrapper {
  display: flex;
  min-height: 100vh;
}

.kzd-auth-panel {
  width: 42%;
  max-width: 560px;
  padding: 48px;
  background-image: linear-gradient(180deg, rgba(0, 13, 81, .82), rgba(0, 13, 81, .88)), url("/public/branding/bg-auth.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.kzd-auth-panel-brand {
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
}

.kzd-auth-panel-copy h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}

.kzd-auth-panel-copy p {
  color: rgba(255, 255, 255, .8);
  font-size: 1rem;
  max-width: 380px;
}

.kzd-auth-panel-footer small {
  color: rgba(255, 255, 255, .6);
}

.kzd-auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.kzd-auth-form-inner {
  width: 100%;
  max-width: 420px;
}

.kzd-auth-form-inner-wide {
  max-width: 560px;
}

.page-login .card,
.page-signup .card,
.page-password-reset .card {
  border: none;
  box-shadow: var(--bs-box-shadow-lg);
}

/* Dashboard: quick actions + overview stat cards, matching the website's card language */
.kzd-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.kzd-quick-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kzd-stat-card {
  border: none;
}

.kzd-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bs-box-shadow);
}

.kzd-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--bs-border-radius);
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.kzd-stat-icon .icon {
  height: 22px;
  width: 22px;
}

.kzd-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.kzd-stat-label {
  color: var(--bs-secondary-color);
  font-size: .85rem;
  margin-bottom: 4px;
}

.kzd-stat-breakdown {
  font-size: .8rem;
  margin-bottom: 8px;
}

.kzd-stat-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
}

.kzd-stat-link .icon {
  height: 14px;
  width: 14px;
  transition: transform .2s ease;
}

.kzd-stat-link:hover .icon {
  transform: translateX(3px);
}

/* Guest landing hero + marketing feature cards */
.kzd-guest-hero {
  border-radius: var(--bs-border-radius-2xl);
  padding: 64px 40px;
  text-align: center;
  color: #fff;
  background-image: linear-gradient(180deg, rgba(0, 13, 81, .85), rgba(0, 13, 81, .9)), url("/public/branding/bg-auth.jpg");
  background-size: cover;
  background-position: center;
}

.kzd-guest-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--bs-border-radius-pill);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 20px;
}

.kzd-guest-hero-eyebrow .icon {
  height: 14px;
  width: 14px;
}

.kzd-guest-hero h1 {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  max-width: 700px;
  margin: 0 auto 16px;
}

.kzd-guest-hero p {
  color: rgba(255, 255, 255, .85);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 32px;
}

.kzd-guest-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.kzd-guest-hero-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kzd-feature-card {
  border: none;
  text-align: center;
}

.kzd-feature-card .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kzd-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bs-box-shadow);
}

.kzd-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.kzd-feature-icon .icon {
  height: 26px;
  width: 26px;
}

.kzd-feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.kzd-feature-card p {
  color: var(--bs-secondary-color);
  font-size: .875rem;
  margin-bottom: 0;
}

.kzd-quicklinks-header {
  margin-bottom: 16px;
}

.kzd-quicklinks-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bs-body-color);
  margin-bottom: 0;
}

.kzd-quicklink-card {
  border: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.kzd-quicklink-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bs-box-shadow);
}

.kzd-quicklink-card .card-body {
  display: flex;
  flex-direction: column;
}

.kzd-quicklink-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--bs-border-radius);
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.kzd-quicklink-icon .icon {
  height: 22px;
  width: 22px;
}

.kzd-quicklink-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.kzd-quicklink-card p {
  color: var(--bs-secondary-color);
  font-size: .875rem;
  flex-grow: 1;
}

.kzd-quicklink-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Sidebar navigation: grouping + pinned quick action */
.kzd-sidebar-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.kzd-nav-group-label {
  padding: 16px 12px 6px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--bs-secondary-color);
}

.offcanvas-item {
  border-radius: var(--bs-border-radius);
}

.offcanvas-item.active {
  border-radius: var(--bs-border-radius);
}

@media (max-width: 767px) {
  .kzd-guest-hero {
    padding: 40px 24px;
  }

  .kzd-guest-hero h1 {
    font-size: 1.75rem;
  }
}

/* Order flow step indicator (mod_orderbutton_content.html.twig) */
.kzd-order-steps {
  gap: 8px;
}

.kzd-order-step {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--bs-border-color);
  color: var(--bs-secondary-color);
  min-width: 72px;
}

.kzd-order-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bs-tertiary-bg);
  margin-bottom: 6px;
}

.kzd-order-step-icon .icon {
  width: 16px;
  height: 16px;
}

.kzd-order-step-label {
  font-size: 0.8125rem;
  font-weight: 500;
}

.kzd-order-step.is-done {
  border-bottom-color: var(--bs-primary);
  color: var(--bs-body-color);
}

.kzd-order-step.is-done .kzd-order-step-icon {
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
}

.kzd-order-step.is-active {
  border-bottom-color: var(--bs-primary);
  color: var(--bs-body-color);
}

.kzd-order-step.is-active .kzd-order-step-icon {
  background: var(--bs-primary);
  color: #fff;
}

@media (max-width: 575px) {
  .kzd-order-step-label {
    display: none;
  }
}

/* Domain configuration picker (Register/Transfer/Own domain/Subdomain).
   Used by mod_servicedomain_order_form.html.twig (Register/Transfer only)
   and mod_servicehosting_order_form.html.twig (all four options). Mobile
   default: nav-pills in its natural horizontal row (flex-md-column below
   switches it to the desktop sidebar), divider under it instead of beside
   it. flex-md-row/flex-md-column on the wrapper/nav themselves come from
   Bootstrap directly -- only the divider needs a custom rule, since this
   build's Bootstrap utilities aren't compiled with responsive border
   variants. */
.kzd-domain-picker-nav {
  flex-wrap: wrap;
  border-bottom: 1px solid var(--bs-border-color);
  padding-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .kzd-domain-picker-nav {
    flex-wrap: nowrap;
    border-bottom: 0;
    border-right: 1px solid var(--bs-border-color);
    padding-bottom: 0;
    padding-right: 1rem;
  }
}

.kzd-domain-picker-content {
  min-width: 0;
  flex: 1 1 auto;
}

/* Domain search row (SLD input + TLD select/input + Check button).
   Desktop: the fixed max-width the input-group had inline before is now
   here instead, so this same class can be widened per breakpoint without
   fighting an inline style. TLD select/input sized to fit its own content
   (".co.za") rather than the old fixed 30%/90-120px split, which is what
   was clipping it at narrow widths. */
.kzd-domain-input-group {
  max-width: 500px;
}

/* Hosting form's Register/Transfer/Own domain fields were narrower (320px)
   than the standalone domain form's (500px) -- preserved here rather than
   flattened to one width, so desktop appearance is unchanged. */
.kzd-domain-input-group--compact {
  max-width: 320px;
}

/* Targets `.input-group > .kzd-domain-tld-select` (not just
   `.kzd-domain-tld-select` alone) to match Bootstrap's own
   `.input-group > .form-select` rule's specificity -- a single-class
   selector here loses that fight regardless of source order, which is why
   the TLD field was still splitting the row ~50/50 with the domain input
   instead of shrinking to fit its own content. */
.input-group > .kzd-domain-tld-select {
  flex: 0 0 auto;
  width: auto;
  min-width: 4.5rem;
  max-width: 6rem;
}

@media (max-width: 575.98px) {
  .kzd-domain-input-group,
  .kzd-domain-input-group--compact {
    max-width: none;
  }

  .kzd-domain-check-btn {
    width: 100%;
  }
}

/* Addon price column (mod_orderbutton_addons.html.twig): right-aligned
   next to the title on wider screens, stacked underneath (left-aligned)
   on narrow ones instead of staying text-nowrap and fighting the title
   for width. */
.kzd-addon-price {
  text-align: left;
}

@media (min-width: 576px) {
  .kzd-addon-price {
    text-align: right;
    margin-left: auto;
  }
}

/* Invoice payment-gateway logo buttons (mod_invoice_invoice.html.twig).
   Their exact height/width still comes from each gateway's DB-stored logo
   dimensions (inline style, set per-gateway in admin) -- max-width/
   max-height here don't fight that inline width/height (different
   properties, no specificity conflict), they just stop an
   admin-configured oversized logo from blowing out the row on narrow
   screens. Combined with flex-wrap on the parent row (added inline), 3+
   gateways wrap to a second line instead of overflowing. */
.kzd-gateway-logo {
  max-width: 90px;
  max-height: 48px;
}

/* Domain "manage" page stat row (Name/Expires/Registered) --
   modules/Servicedomain/templates/client/mod_servicedomain_manage.html.twig.
   Long domain names at fs-4 plus two more stat blocks in one unwrapped
   row can overflow a narrow screen; stacks below sm, row above (same
   shape as the domain-picker fix). */
.kzd-domain-stats {
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

@media (min-width: 576px) {
  .kzd-domain-stats {
    flex-direction: row;
    align-items: center;
  }
}
