/* Paradigm HelpScout Custom Stylesheet */
/* Based on Paradigm Brand Guidelines - June 2025 */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');

/* Try to load Circular Std if available, otherwise use Inter as substitute */
/* Arial will be the ultimate fallback */

/* ==================== ROOT VARIABLES ==================== */
:root {
    /* Paradigm Brand Colors */
    --paradigm-blue: #076efd;
    --paradigm-grey: #102d36;
    --paradigm-grey-light: #f7f8f8;
    --paradigm-mauve: #a73b8d;
    --paradigm-yellow: #f4b11f;
    --paradigm-beige: #faf5ed;
    --paradigm-turquoise: #30ced0;
    --paradigm-lilac: #c562cf;
    
    /* Typography - Try Circular Std first */
    --font-primary: 'Circular Std', 'Inter', 'Arial';
    --font-weight-book: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;
    --font-weight-black: 900;
}

/* ==================== GLOBAL STYLES ==================== */
body {
    background: #ffffff !important;
    font-family: var(--font-primary);
    color: var(--paradigm-grey);
}

/* Make main containers use white background */
.container,
.container-fluid,
#main {
    background: #ffffff !important;
}

/* Preserve icon fonts - DO NOT override font-family on pseudo-elements */
[class^="icon-"]:before,
[class*=" icon-"]:before,
.icon-search:before,
.most-pop-articles li:before,
.popArticles li:before,
ul.article-list li:before,
.article-list-item:before,
li:before {
    font-family: inherit !important;
}

/* ==================== HEADER / NAVBAR ==================== */
.navbar .navbar-inner {
    background: #ffffff;
    height: 70px;
    border-bottom: 2px solid #ECEBEC;
}

.navbar .navbar-inner .container-fluid {
    padding: 0;
    height: 70px;
    background: #ffffff !important;
}

.navbar .brand {
    float: left;
    display: block;
    padding: 5px 0;
    margin-left: 0;
}

a.brand > img {
    max-width: 100%;
    vertical-align: middle;
    border: 0;
    height: 50px;
    margin-left: 15px;
    width: auto;
}

.navbar .nav li {
    display: inline-block;
    float: none;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.02em;
}

.navbar .nav li a {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: #102F38 !important;
    transition: color 0.2s ease;
}

.navbar .nav li a:hover {
    color: var(--paradigm-blue);
}

/* ==================== HOME PAGE SEARCH SECTION ==================== */
#docsSearch {
    background: #076EFD !important;
    background-color: #076EFD !important;
    border-top: none;
    margin-bottom: 0;
    padding: 2em 0;
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.18);
}

#docsSearch, #docsSearch .container, #docsSearch .container-fluid {
    background: #076EFD !important;
    background-color: #076EFD !important;
}

#docsSearch h1 {
    font-size: 32px;
    color: #ffffff !important;
    font-weight: var(--font-weight-medium);
    text-align: center;
    margin-top: 0;
    margin-bottom: 0.7em;
    font-family: var(--font-primary);
}

/* ==================== CATEGORY SECTION - HOMEPAGE ONLY ==================== */
/* Background with decorative circles behind category cards on homepage */
.collection-category {
    background: #ffffff !important;
    padding: 3em 0 4em 0;
    position: relative;
    overflow: visible;
}

/* Decorative Circle - REMOVED */
.collection-category::before {
    display: none !important;
}

/* Decorative Circle - REMOVED */
.collection-category::after {
    display: none !important;
}

.collection-category h2 {
    font-weight: var(--font-weight-medium);
    margin: 0 0 30px;
    text-align: left;
    padding-left: 1%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1140px;
    font-family: Circular Std;
    color: var(--paradigm-grey);
    font-size: 28px;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.collection-category .category-list {
  margin: 0 0 0;
  text-align: center;
  position: relative;
}

/* Decorative Circle - REMOVED */
.collection-category .category-list::before {
    display: none !important;
}

/* Category Cards - Enhanced with shadows and hover effects */
.collection-list,
.category-list {
  position: relative;
}

.collection-list .collection,
.category-list .category,
.collection-list-item,
.category-list-item {
  background: #FFFFFF !important;
  border: 1px solid #E5E5E5 !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 8px rgba(16, 47, 56, 0.08) !important;
  position: relative;
  z-index: 1;
}

.collection-list .collection:hover,
.category-list .category:hover,
.collection-list-item:hover,
.category-list-item:hover {
  box-shadow: 0 8px 24px rgba(7, 110, 253, 0.15) !important;
  transform: translateY(-4px) !important;
  border-color: #076EFD !important;
}

/* Category titles on homepage */
.category h2,
.category h3,
.collection-title,
.category-title {
  color: #102F38 !important;
  font-weight: 400;
  margin-bottom: 12px;
}

/* Collection page titles - KEEP BLACK not blue */
.collection-category h2,
.collection-category h2 a,
#fullArticle h1,
.contentWrapper > h1 {
  color: #102d36 !important;
  font-weight: 700 !important;
}

/* Links */
a {
  color: #076EFD !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #2D51A4 !important;
  text-decoration: underline;
}

/* Article links in categories */
.category a,
.collection a,
.article-list-item a,
#sidebar .nav-list a {
  color: #102F38 !important;
  transition: all 0.2s ease;
}

.category a:hover,
.collection a:hover,
.article-list-item a:hover,
#sidebar .nav-list a:hover {
  color: #076EFD !important;
  padding-left: 8px;
}

/* Article count badges */
.article-count,
.collection-count {
  color: #CCCCCC !important;
  font-size: 14px;
  font-weight: 500;
}

/* Buttons - only style main homepage search button */
.btn-primary,
.button-primary,
button[type="submit"][aria-label="Search"] {
  background: #102F38 !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 12px 24px !important;
  font-weight: 600;
  transition: background 0.3s ease !important;
  cursor: pointer;
}

.btn-primary:hover,
.button-primary:hover,
button[type="submit"][aria-label="Search"]:hover {
  background: #2D51A4 !important;
}

/* Specific styling for main search button icon */
button[type="submit"][aria-label="Search"] .icon-search,
button[type="submit"][aria-label="Search"] i {
  color: #FFFFFF !important;
}

/* Secondary buttons */
.btn-secondary,
.button-secondary {
  background: #18838D !important;
}

.btn-secondary:hover,
.button-secondary:hover {
  background: #157FAC !important;
}

/* Article content area */
.article-content,
.article-body {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(16, 47, 56, 0.06);
}

/* Headings in articles */
h1, h2, h3, h4, h5, h6 {
  color: #102F38;
  font-weight: 600;
}

/* Code blocks */
code,
pre {
  background: #FCF6ED !important;
  border: 1px solid #102F38 !important;
  border-radius: 4px;
  color: #102F38;
}

/* Tags and labels */
.tag,
.label {
  background: #F4B11F !important;
  color: #102F38 !important;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

/* --- Homepage search bar layout (match original style) --- */
#searchBar {
  text-align: center;
  margin-bottom: 0;
  padding: 2em 0;
  position: relative;
  width: 620px;
  margin: 0 auto;
}

/* Text input */
#searchBar .search-query {
  border-radius: 5px;
  font-size: 18px;
  line-height: 22px;
  width: 100%;
  height: 50px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  padding: 0 9em 0 1.2em;
}

/* Submit button â€" original style */
#searchBar button[type="submit"],
#searchBar button[aria-label="Search"] {
  -webkit-text-size-adjust: 100%;
  margin: 0;
  vertical-align: middle;
  -webkit-appearance: button;
  cursor: pointer;
  font-weight: 400;
  line-height: 18px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #fff;
  text-shadow: 0 -1px 1px rgba(0,0,0,.4);
  background: #4F92CA;
  border-radius: 0 5px 5px 0;
  border: 1px solid #407FB3;
  font-size: 18px;
  padding: 0 1.5em;
  height: 50px;
  position: absolute;
  top: 24px;
  right: -1px;
  z-index: 102 !important;
}

/* Hide the magnifying glass icon like the original */
#searchBar button .icon-search {
  display: none;
}

/* Dropdown under the bar, but above the cards */
#serp-dd {
  position: absolute;
  background: #fff;
  width: 100%;
  top: 70px;
  border: 1px solid #CCC;
  box-shadow: 0 2px 5px rgba(100,100,100,.2);
  border-radius: 0 0 5px 5px;
  z-index: 200;
}

/* This is the search in the sidebar on article/collection pages */
#sidebar .widget-search,
#sidebar .search-widget {
  margin-bottom: 20px;
  position: relative;
}

#sidebar .search-query,
#sidebar input[type="search"],
#sidebar input[type="text"] {
  width: 100%;
  height: 40px;
  padding: 8px 40px 8px 12px;
  border: 1px solid #102F38;
  border-radius: 4px;
  font-size: 14px;
  background: #ffffff;
  box-sizing: border-box;
  font-family: var(--font-primary);
}

#sidebar .search-query:focus,
#sidebar input[type="search"]:focus,
#sidebar input[type="text"]:focus {
  border-color: #999;
  outline: none;
}

/* Search button in sidebar - show icon */
#sidebar button[type="submit"],
#sidebar .search-submit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #999;
  font-size: 16px;
}

#sidebar .icon-search {
  color: #999;
}

/* Toggle Search link styling */
#sidebar .widget-search h3,
#sidebar .search-widget h3 {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--paradigm-grey);
  margin-bottom: 8px;
  font-family: var(--font-primary);
  cursor: pointer;
}

/* ==================== RESPONSIVE STYLES ==================== */

/* Tablet and smaller */
@media screen and (max-width: 1105px) {
    .category-list .category {
        width: 48.2% !important;
    }
    
    .collection-category h2 {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Mobile landscape and smaller */
@media screen and (max-width: 760px) {
    .category-list .category {
        box-sizing: border-box;
        margin: 0 0 20px;
        padding: 20px 25px 15px;
        width: 100% !important;
    }
    
    /* Make search banner full width on mobile */
    #docsSearch {
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
    }
    
    #docsSearch h1 {
        font-size: 28px;
        padding: 0 20px;
    }
    
    /* Center content with padding on mobile */
    .container,
    .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Make search bar responsive */
    #searchBar {
        width: 90%;
        padding: 1em 0;
    }
    
    #searchBar .search-query {
        font-size: 16px;
        padding: 0 1em;
    }
    
    #searchBar button[type="submit"],
    #searchBar button[aria-label="Search"] {
        position: relative;
        top: 10px;
        right: 0;
        width: 100%;
        border-radius: 5px;
        margin-top: 10px;
    }
    
    .collection-category h2 {
        font-size: 24px;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Move sidebar above content on article/category pages */
    .contentWrapper,
    .article-wrapper,
    body {
        display: flex !important;
        flex-direction: column !important;
    }
    
    #sidebar {
        order: -1 !important;
        float: none !important;
        width: 100% !important;
        margin: 0 0 30px 0 !important;
        padding: 0 !important;
    }
    
    #main-content {
        order: 1 !important;
        float: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Fix sort dropdown on category pages - prevent overlap */
    #categoryHead {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;
    }
    
    #categoryHead h1 {
        order: 1;
        margin-bottom: 10px;
    }
    
    #categoryHead .sort {
        order: 2;
        margin-top: 10px;
        text-align: left;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    /* Keep containers with padding but let banner be full width */
    .container,
    .container-fluid {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    /* Make search banner full width */
    #docsSearch {
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }
    
    #searchBar {
        width: 95%;
    }
    
    #searchBar .search-query {
        font-size: 14px;
        height: 45px;
    }
    
    #searchBar button[type="submit"],
    #searchBar button[aria-label="Search"] {
        height: 45px;
        font-size: 16px;
    }
    
    #fullArticle .title,
    .contentWrapper h1 {
        font-size: 24px;
    }
    
    #fullArticle h2 {
        font-size: 20px;
    }

    #docsSearch h1 {
        font-size: 24px;
    }
    
    .collection-category h2 {
        font-size: 22px;
    }
    
    /* Make navbar responsive */
    .navbar .btn-navbar {
        margin-top: 16px;
        right: -10px;
    }
}
