/* ============================================
   UPLEVEL SYSTEMS - ZOHO DESK KB CSS
   Final version - mobile blur fixed
   ============================================ */

body, html {
    width: 100% !important;
    max-width: 100% !important;
}

.Header__header,
.Header__headerContainer,
.Header__headerRow {
    max-width: 100% !important;
    width: 100% !important;
}

.Header__header {
    background: #6B46C1 !important;
    box-shadow: 0 10px 25px rgba(107, 70, 193, 0.15) !important;
}

.Header__headerImg {
    display: none !important;
    height: 0 !important;
}

.Header__headerContainer {
    background: #6B46C1 !important;
    padding: 0 3rem !important;
}

.Header__headerRow {
    display: flex !important;
    align-items: center !important;
    padding: 1.25rem 0 !important;
    gap: 2rem !important;
}

/* ============================================
   LOGO
   ============================================ */

.Header__brandLogo img {
    max-height: 45px !important;
}

.Header__brandName {
    color: #FFFFFF !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: nowrap !important;
}

/* ============================================
   SEARCH BAR
   ============================================ */

.Header__headerSearch {
    display: flex !important;
    flex: 1 !important;
    max-width: 600px !important;
    min-width: 300px !important;
    position: relative !important;
    overflow: visible !important;
    background: transparent !important;
}

#searchContainer,
.Header__headerSearchInner {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    position: relative !important;
    overflow: visible !important;
    background: transparent !important;
}

#searchContainer > div {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    background: transparent !important;
}

.Search__searchPanel,
.Search__searchPanelInner,
.Search__searchPanelControls {
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    width: 100% !important;
}

.Input__searchPanelInput,
input[data-id="searchInput"],
div[class*="searchPanel"] input[type="text"] {
    width: 100% !important;
    height: 45px !important;
    padding: 0.875rem 3rem 0.875rem 1.25rem !important;
    border-radius: 24px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    color: #1A202C !important;
    font-size: 1rem !important;
}

.Input__searchPanelInput:focus,
input[data-id="searchInput"]:focus {
    outline: none !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2) !important;
}

.Search__searchPanelIcon svg {
    fill: #6B46C1 !important;
    width: 20px !important;
    height: 20px !important;
}

.Search__searchPanelClose {
    display: none !important;
}

/* Hide mobile search icon on desktop */
.Search__searchIcon {
    display: none !important;
}

/* ============================================
   SEARCH RESULTS DROPDOWN
   ============================================ */

.searchPanelSections,
div[class*="searchPanelSections"],
.Search__searchResults,
div[class*="searchResults"] {
    display: none !important;
}

.searchPanelSections:not(:empty),
div[class*="searchPanelSections"]:not(:empty) {
    display: block !important;
    position: absolute !important;
    top: calc(100% + 0.5rem) !important;
    left: 0px !important;
    right: 0px !important;
    background: #FFFFFF !important;
    border-radius: 0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid #E2E8F0 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    z-index: 10000 !important;
    min-height: 50px !important;
    padding: 0 !important;
}

.searchPanelSections:not(:empty) a,
div[class*="searchPanelSections"]:not(:empty) a {
    color: #6B46C1 !important;
    text-decoration: none !important;
}

.searchPanelSections:not(:empty) a:hover {
    color: #553C9A !important;
    text-decoration: underline !important;
}

.searchPanelSections:not(:empty) > div {
    padding: 0.75rem 1.5rem !important;
    border-bottom: 1px solid #E2E8F0 !important;
    cursor: pointer !important;
    background: #FFFFFF !important;
}

.searchPanelSections:not(:empty) > div:hover {
    background: #F7FAFC !important;
}

.searchPanelSections:not(:empty) > div:last-child {
    border-bottom: none !important;
}

/* ============================================
   SIGN IN / SIGN UP
   ============================================ */

.Header__headerRow > a,
.Header__headerRow > button,
.Header__headerRow > div > a,
.Header__headerRow > div > button {
    color: #FFFFFF !important;
    padding: 0.625rem 1.5rem !important;
    border-radius: 24px !important;
    font-weight: 500 !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    background: transparent !important;
    white-space: nowrap !important;
}

.Header__headerRow > a:hover,
.Header__headerRow > button:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* ============================================
   NAVIGATION TABS
   ============================================ */

.Header__headerNav {
    background: #553C9A !important;
    width: 100% !important;
    overflow: hidden !important;
}

.Header__tabsList {
    padding: 0 2.5rem !important;
    margin: 0 !important;
}

.Header__tabsTab a {
    padding: 0.875rem 1.75rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.Header__tabsTab a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #FFFFFF !important;
}

.Header__tabsTab.active a,
.Header__tabsTab a.active,
.Header__tabsTab[class*="active"] a,
li[class*="active"] a {
    color: #FFFFFF !important;
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   BODY & LAYOUT
   ============================================ */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: #1A202C !important;
    background: #F7FAFC !important;
}

.kb-content-wrapper,
.main-content {
    width: 100% !important;
    padding: 0 3rem !important;
    display: flex !important;
    gap: 2rem !important;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: 280px !important;
}

.sidebar-widget,
.kb-sections {
    background: #FFFFFF !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    border: 1px solid #E2E8F0 !important;
}

.sidebar-widget h3,
.kb-sections h3 {
    color: #553C9A !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #E2E8F0 !important;
    padding-bottom: 0.75rem !important;
}

/* ============================================
   ARTICLE CARDS
   ============================================ */

.article-card,
.kb-article {
    background: #FFFFFF !important;
    border-radius: 12px !important;
    padding: 2rem !important;
    margin-bottom: 1.5rem !important;
    border: 1px solid #E2E8F0 !important;
    transition: box-shadow 0.3s ease !important;
}

.article-card:hover,
.kb-article:hover {
    box-shadow: 0 10px 25px rgba(107, 70, 193, 0.15) !important;
}

.article-card img[src*="briefcase"],
.kb-article img[src*="briefcase"] {
    display: none !important;
}

.article-card h2,
.article-card h3,
.kb-article h2,
.kb-article h3 {
    color: #6B46C1 !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
}

.article-card h2 a,
.article-card h3 a {
    color: #6B46C1 !important;
    text-decoration: none !important;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn,
button:not(.Header__headerRow button):not([class*="searchPanel"]),
.follow-button,
[class*="follow"] button {
    background: #6B46C1 !important;
    color: #FFFFFF !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    border: none !important;
    font-weight: 500 !important;
}

.btn:hover,
button:hover {
    background: #553C9A !important;
}

/* ============================================
   TABLET RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .Header__headerContainer {
        padding: 0 1.5rem !important;
    }

    .Header__headerRow {
        gap: 1rem !important;
        padding: 1rem 0 !important;
    }

    .Header__headerSearch {
        min-width: 200px !important;
    }

    .Header__tabsList {
        padding: 0 1.25rem !important;
    }

    .Header__tabsTab a {
        padding: 0.75rem 1rem !important;
    }

    .kb-content-wrapper,
    .main-content {
        padding: 0 1.5rem !important;
    }

    .Header__brandName {
        font-size: 1.2rem !important;
    }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .Header__headerContainer {
        padding: 0 1rem !important;
    }

    .Header__headerRow {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.75rem !important;
        padding: 0.75rem 0 !important;
    }

    /* Brand - prevent truncation */
    .Header__headerBrand {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    .Header__brand {
        overflow: visible !important;
    }

    .Header__brandName {
        font-size: 1rem !important;
    }

    .Header__brandLogo img {
        max-height: 30px !important;
    }

    /* Show mobile search icon */
    .Search__searchIcon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #FFFFFF !important;
    }

    .Search__searchIcon svg {
        fill: #FFFFFF !important;
        width: 22px !important;
        height: 22px !important;
    }

    /* Search container compact on mobile */
    .Header__headerSearch {
        flex: 0 0 auto !important;
        min-width: unset !important;
        max-width: unset !important;
    }

    /* Sign in/up buttons */
    .Header__headerRow > a,
    .Header__headerRow > button,
    .Header__headerRow > div > a,
    .Header__headerRow > div > button {
        padding: 0.35rem 0.65rem !important;
        font-size: 0.75rem !important;
        border-width: 1px !important;
    }

    /* Nav tabs */
    .Header__tabsList {
        padding: 0 0.75rem !important;
    }

    .Header__tabsTab a {
        padding: 0.75rem 1rem !important;
        font-size: 0.85rem !important;
    }

    /* Content area */
    .kb-content-wrapper,
    .main-content {
        flex-direction: column !important;
        padding: 0 1rem !important;
    }
    
    .sidebar {
        width: 100% !important;
    }
}

/* ============================================
   SMALL MOBILE
   ============================================ */

@media (max-width: 480px) {
    .Header__headerContainer {
        padding: 0 0.5rem !important;
    }

    .Header__headerRow {
        gap: 0.5rem !important;
    }

    .Header__brandName {
        font-size: 0.85rem !important;
    }

    .Header__brandLogo img {
        max-height: 25px !important;
    }

    .Header__tabsList {
        padding: 0 0.25rem !important;
    }

    .Header__tabsTab a {
        padding: 0.625rem 0.75rem !important;
        font-size: 0.8rem !important;
    }

    .Header__headerRow > a,
    .Header__headerRow > button,
    .Header__headerRow > div > a,
    .Header__headerRow > div > button {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.7rem !important;
    }
}
