/* SupportPal safety overrides for DreamIT header/footer scope */
.dreamit-scope {
  --dreamit-max-width: 1170px;
}

.dreamit-scope .container { max-width: var(--dreamit-max-width); }
.sp-content, .sp-content-inner { position: relative; z-index: 1; }
.dreamit-scope iframe, .dreamit-scope img { max-width: 100%; }

/* Ensure mega menu visibility on desktop (hover + JS active class) */
.dreamit-scope .main-menu > ul > li.drp:hover > .mega-drop,
.dreamit-scope .main-menu > ul > li.drp > .mega-drop.active {
  opacity: 1 !important;
  transform: scale(1) !important;
  pointer-events: auto !important;
  z-index: 99 !important;
}

/* Footer vendor logo sizing */
.dreamit-scope .footer-bottom-left ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.dreamit-scope .footer-bottom-left ul li { margin-right: 0; }
.dreamit-scope .footer-bottom-left ul li a { display: inline-flex; align-items: center; }
.dreamit-scope .footer-bottom-left ul li a img {
  width: auto !important;
  height: auto !important;
  max-height: 38px !important;
  object-fit: contain;
}
.dreamit-scope .footer-bottom-left ul li:nth-child(4) a img { max-height: 44px !important; }

/* Header/mobile menu behaviour */
@media (max-width: 991px) {
  .dreamit-scope .main-menu .menu-list { display: none; }

  .dreamit-scope .mobile-menu .menu-list { display: none; }
  .dreamit-scope .mobile-menu .menu-list.active { display: block; }

  .dreamit-scope .mobile-menu .menu-list > li { display: block; }

  .dreamit-scope .mobile-menu .menu-list > li > .mega-drop,
  .dreamit-scope .mobile-menu .menu-list > li > ul {
    position: static;
    width: 100%;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    display: none;
    padding-top: 0;
    border-radius: 0;
  }

  .dreamit-scope .mobile-menu .menu-list > li.open > .mega-drop,
  .dreamit-scope .mobile-menu .menu-list > li.open > ul {
    display: block;
  }

  .dreamit-scope .mobile-menu .mega-drop-wraper {
    padding: 12px 15px;
    border-radius: 0;
  }

  .dreamit-scope .mobile-menu .mega-drop-main .row {
    display: block;
    margin: 0;
  }

  .dreamit-scope .mobile-menu .mega-drop-main [class*="col-"] {
    max-width: 100%;
    flex: 0 0 100%;
    padding: 0;
  }

  .dreamit-scope .mobile-menu .mega-drop-box {
    padding: 8px 0;
    margin-bottom: 0;
  }

  .dreamit-scope .mobile-menu .mega-drop-box p {
    display: none;
  }

  .dreamit-scope .footer-bottom-left ul {
    justify-content: center;
    gap: 10px;
  }

  .dreamit-scope .footer-bottom-left ul li a img {
    max-height: 32px !important;
  }

  .dreamit-scope .footer-bottom-left ul li:nth-child(4) a img {
    max-height: 36px !important;
  }
}

/* Header clipping fix: force full two-row desktop header visibility */
.dreamit-scope.dreamit-header-wrapper,
.dreamit-scope .header {
  height: auto !important;
  min-height: 120px;
  overflow: visible !important;
}

.dreamit-scope .header-main,
.dreamit-scope .header-right-block,
.dreamit-scope .header-right-top-block,
.dreamit-scope .main-menu,
.dreamit-scope .main-menu > ul {
  overflow: visible !important;
}

@media (max-width: 991px) {
  .dreamit-scope.dreamit-header-wrapper,
  .dreamit-scope .header {
    min-height: 72px;
  }
}

/* FIX: Hero section negative top margin overlaps header */
.dreamit-hero-section { margin-top: 0 !important; }

/* Header z-index above hero for mega menus */
.dreamit-scope.dreamit-header-wrapper { position: relative; z-index: 100; }

/* ===== DreamIT typography + hero contrast overrides (2026-02-24) ===== */

/* Global DreamIT font alignment with main site */
.dreamit-scope,
.dreamit-scope body,
.dreamit-scope .sp-content,
.dreamit-scope .sp-content *,
.dreamit-scope input,
.dreamit-scope select,
.dreamit-scope textarea,
.dreamit-scope button {
  font-family: aller, sans-serif !important;
}

/* Headings / hero titles use DreamIT display font */
.dreamit-scope h1,
.dreamit-scope h2,
.dreamit-scope h3,
.dreamit-scope h4,
.dreamit-scope h5,
.dreamit-scope h6,
.dreamit-scope .hero-title,
.dreamit-scope .hero-content h1,
.dreamit-scope .hp-hero h1,
.dreamit-scope .kb-b-hero h1,
.dreamit-scope .kb-b-hero h2,
.dreamit-scope .kb-art-title,
.dreamit-scope .main-menu > ul > li > a,
.dreamit-scope .footer h3,
.dreamit-scope .footer h4 {
  font-family: objektiv-mk1, sans-serif !important;
}

/* Keep icon fonts intact */
.dreamit-scope .fa,
.dreamit-scope .fas,
.dreamit-scope .far,
.dreamit-scope .fab {
  font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands", "FontAwesome" !important;
}
.dreamit-scope [class^="icon-"],
.dreamit-scope [class*=" icon-"],
.dreamit-scope [class^="icomoon"],
.dreamit-scope [class*=" icomoon"] {
  font-family: "icomoon" !important;
}

/* Ensure all blue hero/cover section text is white and readable */
.dreamit-scope .hp-hero,
.dreamit-scope .hp-hero *,
.dreamit-scope .kb-b-hero,
.dreamit-scope .kb-b-hero *,
.dreamit-scope .kb-art-hero,
.dreamit-scope .kb-art-hero *,
.dreamit-scope .dreamit-hero-section,
.dreamit-scope .dreamit-hero-section *,
.dreamit-scope .hero-content,
.dreamit-scope .hero-content * {
  color: #ffffff !important;
}

/* Remove partial opacity that makes white text appear grey */
.dreamit-scope .hp-hero p,
.dreamit-scope .kb-b-hero p,
.dreamit-scope .kb-art-crumbs a,
.dreamit-scope .kb-art-meta-item,
.dreamit-scope .hero-content p {
  opacity: 1 !important;
}

/* Keep hero search field text dark on white inputs */
.dreamit-scope .hp-hero input[type="text"],
.dreamit-scope .hp-hero input[type="search"],
.dreamit-scope .hp-hero .search-input,
.dreamit-scope .hp-hero input,
.dreamit-scope .kb-b-hero input[type="text"],
.dreamit-scope .kb-b-hero input[type="search"],
.dreamit-scope .kb-b-hero input,
.dreamit-scope .dreamit-hero-section input,
.dreamit-scope .hero-content input {
  color: #333 !important;
}

.dreamit-scope .hp-hero input::placeholder,
.dreamit-scope .kb-b-hero input::placeholder,
.dreamit-scope .dreamit-hero-section input::placeholder {
  color: #999 !important;
}

/* ===== DreamIT text contrast hardening (unscoped fallback) - 2026-02-24 ===== */
/* Ensure hero text stays white even when page content is outside .dreamit-scope */
.hp-hero h1,
.hp-hero h2,
.hp-hero p,
.hp-hero span,
.hp-hero label,
.kb-b-hero h1,
.kb-b-hero h2,
.kb-b-hero p,
.kb-b-hero span,
.kb-art-hero h1,
.kb-art-hero h2,
.kb-art-hero p,
.kb-art-hero span,
.dreamit-hero-section h1,
.dreamit-hero-section h2,
.dreamit-hero-section p,
.hero-content h1,
.hero-content h2,
.hero-content p {
  color: #ffffff !important;
}

/* Keep hero search inputs readable on white backgrounds */
.hp-hero input,
.kb-b-hero input,
.dreamit-hero-section input,
.hero-content input {
  color: #333 !important;
}

/* CTA/button text should always be white on blue action buttons */
.kb-art-cta .btn,
.kb-art-cta a.btn,
.cta-section .btn,
.cta-section a,
.sp-cta-btn,
.kb-art-help-btn,
.hp-contact-btn,
a[href*="submitticket"],
a[href*="tel:"] {
  color: #ffffff !important;
}

/* Fix: outline variant of Contact Us button needs blue text, not white */
.hp-contact-btns .hp-contact-btn:last-child {
  color: #0b63f3 !important;
  background: transparent !important;
  border: 2px solid #0b63f3 !important;
}
.hp-contact-btns .hp-contact-btn:last-child:hover {
  color: #fff !important;
  background: #0b63f3 !important;
}


/* ===== Dream-panel article attachments readability + spacing - 2026-02-24 ===== */
/* Match attachment heading tone to sidebar meta headings */
.kb-art-main > h4.sp-mt-6.sp-mb-0,
.kb-art-main .sp-article-attachments h3,
.kb-art-main .attachment-heading,
.kb-art-main .sp-attachments-heading {
  color: #6b7280 !important;
}

/* Ensure visual gap between attachment grid and rating card */
.kb-art-main .sp-attachments {
  margin-bottom: 2rem !important;
}

/* Contact Us button readability fix - 2026-02-24 */
.kb-art-help-btn.kb-art-help-btn-secondary {
  background: #ffffff !important;
  color: #0b63f3 !important;
  border: 2px solid #0b63f3 !important;
}

.kb-art-help-btn.kb-art-help-btn-secondary:hover {
  background: #eff6ff !important;
  color: #0952cc !important;
  border-color: #0952cc !important;
  box-shadow: none !important;
}

/* ===== Remaining SupportPal page theming (2026-02-25) ===== */
body {
  background: #f8f9fb !important;
}

.sp-bg-secondary {
  background-color: #f8f9fb !important;
}

.sp-breadcrumb,
.sp-content-inner > h1,
.sp-content-inner > h2:first-child,
.sp-content-inner > .sp-px-6.sp-mb-4.sp-leading-none {
  display: none !important;
}

.sp-content-inner {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.sp-content {
  width: 100% !important;
  max-width: 100% !important;
}

.sp-content .sp-container {
  max-width: 1200px !important;
}

.dp-page-hero {
  background: linear-gradient(135deg, #0b63f3 0%, #0952cc 100%);
  padding: 52px 0;
  margin: -30px -30px 30px;
  color: #fff;
  text-align: center;
}

.dp-page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 42px);
  color: #fff !important;
  font-weight: 700;
}

.dp-page-hero p {
  margin: 0;
  color: #fff !important;
  opacity: .95;
  font-size: 16px;
}

.dp-panel-page {
  max-width: 980px;
  margin: 0 auto 36px;
  padding: 0 10px;
}

.dp-panel-card {
  background: #fff;
  border: 1px solid #e5e9f2;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(15, 39, 78, .08);
  padding: 28px 24px;
}

.dp-auth-page {
  max-width: 760px;
}

.dp-auth-card {
  padding: 30px 28px;
}

.dp-panel-title {
  font-family: objektiv-mk1, sans-serif !important;
  color: #0f274e;
  font-size: 30px;
  margin: 0 0 8px;
}

.dp-panel-intro {
  color: #5b6476;
  margin-bottom: 20px;
}

.dp-panel-card .sp-form-row {
  margin-bottom: 18px;
}

.dp-panel-card .sp-form-row > label,
.dp-panel-card .sp-form-row .sp-input-container > label {
  font-weight: 600;
  color: #243148;
  margin-bottom: 6px;
  display: inline-block;
}

.dp-panel-card .sp-input-container input,
.dp-panel-card .sp-input-container select,
.dp-panel-card .sp-input-container textarea,
.dp-panel-card .sp-input-container .select2-selection {
  border: 1px solid #d9e1f2 !important;
  border-radius: 10px !important;
  min-height: 44px;
  box-shadow: none !important;
  background: #fff;
}

.dp-panel-card .sp-input-container input:focus,
.dp-panel-card .sp-input-container select:focus,
.dp-panel-card .sp-input-container textarea:focus {
  border-color: #0b63f3 !important;
  box-shadow: 0 0 0 3px rgba(11, 99, 243, .14) !important;
}

.dp-panel-card .sp-form-button {
  margin-top: 24px;
}

.dp-panel-card .sp-form-button input[type="submit"],
.dp-panel-card .sp-form-button button,
.dp-panel-card .sp-button,
.dp-panel-card .sp-file-input > a,
.dp-panel-btn {
  background: #0b63f3 !important;
  border-color: #0b63f3 !important;
  color: #fff !important;
  border-radius: 10px !important;
  text-decoration: none !important;
}

.dp-panel-card .sp-form-button input[type="submit"]:hover,
.dp-panel-card .sp-form-button button:hover,
.dp-panel-card .sp-button:hover,
.dp-panel-card .sp-file-input > a:hover,
.dp-panel-btn:hover {
  background: #0952cc !important;
  border-color: #0952cc !important;
}

.dp-back-link {
  margin-top: 20px;
  text-align: center;
}

.dp-back-link a {
  color: #0b63f3;
  font-weight: 600;
  text-decoration: none;
}

.dp-back-link a:hover {
  color: #0952cc;
  text-decoration: underline;
}

/* Logged-in ticket/account sections */
.sp-sidebar-box,
.sp-message,
.sp-ticket-details,
.sp-date-range-filter .sp-action,
.sp-dataTable,
.sp-tab-container,
.sp-collapsible {
  border-radius: 12px !important;
}

.sp-sidebar-box,
.sp-message,
.sp-dataTable,
.sp-collapsible {
  border-color: #dbe4f4 !important;
}

.sp-ticket-status.sp-badge,
.sp-ticket-priority.sp-badge {
  color: #fff !important;
}

@media (max-width: 768px) {
  .dp-page-hero {
    margin: -20px -20px 24px;
    padding: 36px 16px;
  }

  .dp-panel-card,
  .dp-auth-card {
    padding: 22px 16px;
  }
}

/* Search icon on article hero - force white */
.kb-art-hero-search,
.kb-art-hero-search i {
    color: #fff !important;
}

/* ===== Homepage UX polish (P1 + P2 fixes) - 2026-02-26 ===== */

/* P1: Remove phantom 36px indent (hidden index circles orphaned margin) */
.hp-article-excerpt {
    margin: 6px 0 8px 0;
    font-size: 13px;
    color: #5b6476;
    line-height: 1.55;
}
.hp-article-meta {
    margin-left: 0;
}

/* P1: Search button right border-radius */
.hp-search button {
    border-radius: 0 50px 50px 0;
}

/* P1: Body font - aller as primary */
body,
.hp-search input,
.hp-article-title,
.hp-article-excerpt,
.hp-chip {
    font-family: aller, Inter, Arial, Helvetica, sans-serif;
}

/* P2: Category tag chips - brand blue */
.hp-chip.cat {
    background: #ebf2ff;
    color: #0b63f3;
}

/* P2: Contact CTA secondary button (outline) */
.hp-contact-btn:last-child {
    background: transparent;
    color: #0b63f3;
    border: 2px solid #0b63f3;
}
.hp-contact-btn:last-child:hover {
    background: #0b63f3;
    color: #fff;
}

/* P2: Contact CTA as card */
.hp-contact {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 14px;
    padding: 32px 24px;
    margin-top: 8px;
}

/* P2: Category icon background tint */
.hp-cat-icon {
    background: #ffffff;
    border: 1px solid #e5e9f2;
}
.hp-cat-icon.is-image {
    background: #ffffff;
}

/* P2: Popular/Latest icon colours */
.hp-articles-col:first-child h3 i { color: #f59e0b; }
.hp-articles-col:last-child h3 i { color: #0b63f3; }

/* P2: Article card hover accent + shadow consistency */
.hp-article-item a {
    border-left: 3px solid transparent;
}
.hp-article-item a:hover {
    border-left-color: #0b63f3;
    border-color: #cfe0ff;
    box-shadow: 0 10px 24px rgba(17,82,191,.08);
}

/* P2: CTA button radius harmonised */
.hp-contact-btn {
    border-radius: 12px;
    padding: 13px 26px;
}

/* P2: Hero breathing room */
.hp-hero {
    margin-bottom: 32px;
}

/* P2: Typography hierarchy */
.hp-articles-col h3 {
    font-size: 20px;
    margin: 0 0 16px;
}
.hp-article-title {
    font-size: 15px;
}

/* P2: Mobile improvements */
@media (max-width: 768px) {
    .hp-cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hp-articles-col {
        padding: 16px 0;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    .hp-article-item a {
        padding: 16px;
    }
}
@media (max-width: 500px) {
    .hp-cat-grid {
        grid-template-columns: 1fr;
    }
}

/* Anchor scroll offset for native browser scrolls */
[id] { scroll-margin-top: 140px; }

/* ===== Fix: article hero search - override global input[type=search] styles (2026-02-26) ===== */
/* dreamit-theme.css sets background-color:#fff !important on all inputs - must be overridden here */
.kb-art-hero-search-input,
.kb-art-hero .kb-art-hero-search-input {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px 14px !important;
    color: #ffffff !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.kb-art-hero-search-input::placeholder,
.kb-art-hero .kb-art-hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.86) !important;
    opacity: 1 !important;
}

.kb-art-hero-search-input:focus,
.kb-art-hero .kb-art-hero-search-input:focus {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.kb-art-hero-search-form {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

/* Fix: sp-overflow-hidden on .sp-content kills position:sticky on sidebar TOC */
.sp-content.sp-overflow-hidden {
  overflow: visible !important;
}

/* Match sidebar link focus treatment to the theme instead of SupportPal's default ring */
.kb-b-sidecard a,
.kb-b-article-links a,
.kb-b-article-links li a {
    outline: none !important;
    outline-offset: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
}

.kb-b-sidecard a:focus,
.kb-b-article-links a:focus,
.kb-b-article-links li a:focus {
    outline: none !important;
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(11, 99, 243, 0.18) !important;
    color: #0b63f3 !important;
    text-decoration: underline !important;
}

.kb-b-sidecard a:focus-visible,
.kb-b-article-links a:focus-visible,
.kb-b-article-links li a:focus-visible {
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(11, 99, 243, 0.18) !important;
    color: #0b63f3 !important;
    text-decoration: underline !important;
}
