/* Customer-specific css. Styles defined here can refer to:
 - common portal elements
 - customer-specific elements defined in custom pebble templates
 - elements created by JS scripts, both attached to a project and externally imported
 - elements of dita content, including those with customer's custom class names
 */

@font-face {
    font-family: 'Splunk Data Sans Pro';
    src: url('/static/fonts/SplunkDataSansPro_Lt.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Splunk Data Sans Pro';
    src: url('/static/fonts/SplunkDataSansPro_Rg.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Splunk Data Sans Pro';
    src: url('/static/fonts/SplunkDataSansPro_Md.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Splunk Data Sans Pro';
    src: url('/static/fonts/SplunkDataSansPro_Bd.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Splunk Data Sans Pro';
    src: url('/static/fonts/SplunkDataSansPro_Xbd.ttf') format('truetype');
    font-weight: 800;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Splunk Data Sans Pro';
    src: url('/static/fonts/SplunkDataSansPro_Blk.ttf') format('truetype');
    font-weight: 900;
    font-display: swap;
    font-style: normal;
}


:root {
    --splunk-lipstick: #CE0070;
    --splunk-darklipstick: rgba(168, 0, 91, 1);
    --splunk-lightgrey: #F0F3F7;
    --splunk-grey: grey;
    --splunk-mediumgrey: #656C76;
    --splunk-darkgrey: #363C44;
    --splunk-mineshaft: #292929;
    --header-height: 95px;
    --mobile-header-height: 68px;
    --pico-color: var(--splunk-darkgrey) !important;
    font-family: "Splunk Data Sans Pro", var(--pico-font-family);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Splunk Data Sans Pro", var(--pico-font-family);
    --pico-color: var(--splunk-darkgrey);
}

[role=button],
[type=button],
[type=file]::file-selector-button,
[type=reset],
[type=submit],
button {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

input,
select,
textarea,
button {
    &:focus {
        --pico-box-shadow: none;
    }
}

.homepage-content {
    padding: 2rem;

    :not(.section-cards-grid) h2 {
        font-size: 2.25rem;
        margin-bottom: 2rem;
    }

    @media (max-width: 992px) {
        padding: 1rem 0;
    }
}

.homepage-content .breadcrumbs {
    margin-left: 0;
    margin-bottom: 38px;
    border-bottom: solid 1px rgb(214, 214, 214, 1);
    padding-bottom: 1rem;
}

.breadcrumbs a {
    /* match line-height of toc and mini-toc titles for bottom alignment  */
    line-height: 28px;
}

.homepage-content .breadcrumbs a {
    color: var(--splunk-darkgrey);
    font-weight: 500;
}

.homepage-content .breadcrumbs a:hover {
    text-decoration: underline;
    font-weight: 700;
}

@media (max-width: 1200px) {
    .content-body .breadcrumbs {
        width: calc(100% - 8rem);
    }
}

.content-body .breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs a:last-of-type {
    color: var(--splunk-lipstick);
    text-decoration: none;
    pointer-events: none;
}

.splunk-hero-section h1 {
    font-size: 38px;
    margin-bottom: 4px;
}

.splunk-hero-section p {
    font-size: 18px;
    margin-bottom: 2rem;
    color: var(--splunk-darkgrey);
}

.homepage-content h2 {
    font-size: 24px;
    padding-left: 0;
    margin: 0;
}

.toc {
    background: white;
}

.toc-tree .toc-chevron {
    width: 16px;
    height: 16px;
}

.toc-item-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-direction: row-reverse;
}

.toc-tree .toc-group {
    border-left: none;
}

.toc-item-wrapper:not(:has(.toc-chevron)) {
    margin-left: 1.5rem;
}

.toc-tree a,
.right-nav a {
    background: none !important;
    border: none !important;
    filter: none !important;
    font-size: 16px;
    font-weight: 300;
}

.toc a {
    padding: 4px 0;
}

.right-nav a {
    padding: 0;
}

.toc h6,
.right-nav h6 {
    font-size: 20px;
    color: #2E2E2E;
    font-weight: 700;
    width: calc(100% - 6rem);
}


.toc-tree>.toc-item:has(.active),
.toc-tree a.active,
.right-nav a.active {
    color: var(--splunk-lipstick);
}

.toc>.toc-tree>.toc-item:has(.active)>.toc-item-wrapper>a,
.toc>.toc-tree:has(.active)>.toc-item:has(.active)>.toc-tree:has(.active)>.toc-tree:has(.active)>.toc-item:has(.active)>.toc-item-wrapper>a:first-of-type {
    font-weight: 500;
    color: var(--splunk-mineshaft);
}

.toc-tree a:hover,
.right-nav a:hover {
    color: var(--splunk-darklipstick);
    text-decoration: none;
}

.right-nav a:focus {
    color: var(--splunk-lipstick);
}

.container {
    max-width: 1440px;
    padding: 0 2rem;
}

.section-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: unset;
    margin: 1rem 0 6rem 0;
}

@media (max-width: 768px) {
    .section-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .section-cards-grid {
        display: flex;
        flex-direction: column;
    }
}

.section-cards-grid article {
    position: relative;
    padding: 30px;
    border: none;
    border-radius: 0;
    box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.12) !important;
    min-height: 0;
    height: 100%;
    margin: 0;
}

.section-cards-grid article::after {
    content: "";
    width: 100%;
    height: 2px;
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(270.55deg, #F99D1C 8.98%, #F99C1C 9.4%, #F4781F 21.71%, #F16221 31.74%, #F05A22 38.17%, #EE1D62 64.89%, #CE0070 76.39%);
}

.section-card-title {
    line-height: 1.5;
    margin: 0;
}

.section-card-title a {
    text-decoration: none;
    color: inherit;
}

.section-card-title a:hover {
    text-decoration: underline;
    color: inherit;
}

.section-card-desc {
    color: var(--splunk-mineshaft);
    font-weight: 300;
    font-size: 14px;
    margin: 0px 0px 8px 0px;
}

.section-card-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-card-links {
    margin-top: 1.3rem;
    margin-bottom: 0;

    a {
        text-decoration: none;
        color: var(--splunk-lipstick);
        font-size: 14px;
        font-weight: 400;
        display: block;

        &:hover {
            text-decoration: underline;
            font-weight: bold;
        }
    }
}

.toc-title {
    word-wrap: none;
}

input {
    --pico-outline-width: 0 !important;
}

.splunk-homepage .splunk-search-container,
.splunk-sitesection .splunk-search-container {
    background: url('/images/hero-background.jpg') no-repeat center center;
    background-size: cover;
    border-bottom: 1px solid #ccc;
}

.splunk-search-container {
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.splunk-search-wrapper {
    max-width: 700px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: stretch;

    @media (max-width: 768px) {
        max-width: 350px;
    }
}

wplt-search-bar-web-component {
    width: 100%;
}

button.button.sui-search-box__submit {
    margin-left: 18px;
}

button.button.sui-search-box__submit:disabled {
    opacity: 1;
}

.error-container .splunk-search-container {
    margin-top: 0;
    justify-content: flex-start;

    .search-container {
        justify-content: flex-start;
        margin-left: 0;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .main-content-container {
        grid-template-columns: 315px 1fr !important;
    }
}

@media (min-width: 769px) and (max-width: 1000px) {
    .main-content-container {
        grid-template-columns: 260px 1fr !important;
    }
}

/* example place where it matters: /splunk-cloud-platform/administer/admin-manual/10.1.2507/manage-search-workloads-in-splunk-cloud-platform/workload-management-examples ("Condition" columns content) */
.main-content-container p:first-of-type {
    display: inline;
}


table th {
    --pico-border-width: 0;
    background-color: #444;
    color: white;
    border: 1px solid rgba(0, 0, 0, 0.3) !important;

    p {
        color: white;
    }
}

table td {
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
    background: none;
}

.table tbody:has(> tr:nth-child(3)) tr:nth-child(even) {
    background-color: #f5f5f5;
}


/* Search dropdown hover functionality */
.search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.search-icon-conatiner:hover .search-dropdown,
.dropdown.mega-menu-nav:hover .search-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-dropdown .search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.search-dropdown .search-submit-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

/* Make search icon cursor pointer */
.search-icon,
.dropdown-toggle.search-icon.topnav {
    cursor: pointer;
}

/* Federated search app */
.sui-app {
    a {
        --pico-underline: none;
    }
}

.sui-app-layout-container {
    max-width: unset !important;
}

.result-title a {
    color: var(--splunk-lipstick);
}

/* footer */

.splunk-footer {
    width: 100%;
    background-color: var(--splunk-lightgrey);
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 2rem;

    @media (max-width: 992px) {
        padding: 1rem 0;
    }
}

.splunk-footer-container {
    max-width: 1440px;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 2rem;

    @media (max-width: 640px) {
        flex-direction: column;
        align-items: center;
    }
}

.splunk-footer-image {
    height: 5rem;
    width: auto;

    @media (max-width: 768px) {
        height: 3.5rem;
    }

    @media (max-width: 640px) {
        margin-bottom: 2rem;
    }
}

.splunk-footer-links-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;

    @media (max-width: 640px) {
        align-items: center;
    }
}

.splunk-footer-social-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.splunk-footer-social-links a img {
    width: 35px;
}

.splunk-copyrights-note {
    font-size: 14px;
    color: var(--splunk-mediumgrey);
    margin-bottom: 1rem;
}

.splunk-footer-legal-links {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

.splunk-footer-legal-links a {
    font-size: 18px;
    color: var(--splunk-darkgrey);
    text-decoration: none;
    text-align: center;
}

.search-result a {
    text-decoration: none;

    &:hover {
        color: var(--splunk-darklipstick);
    }
}

.pagination-wrapper {
    @media (max-width: 640px) {
        display: flex;
        flex-direction: column;
        align-items: center;

        .pagination-info {
            margin: 0;
        }
    }
}

.social-sharing-anchor {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1880px;
    height: 0;
    padding: 0 2rem;
    z-index: 20;

    @media (max-width: 1200px) {
        position: absolute;
    }
}

details.dropdown.social-sharing-container {
    position: absolute;
    top: calc(var(--header-height) + 1.2rem);
    right: 4rem;
    z-index: 20;
    padding: 1rem;
    background: white;
    height: 3.5rem;
    border-radius: 6px;

    >summary+ul {
        top: 2.5rem;
    }

    @media (max-width: 768px) {
        top: var(--header-height);
        padding-right: 0;
    }
}

.pdf-download {
    position: absolute;
    top: calc(var(--header-height) + 1.2rem);
    right: 1rem;
    padding: 1rem;
    height: 3.5rem;
    color: var(--pico-primary);
    background-color: white;

    svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    @media (max-width: 768px) {
        top: calc(var(--header-height));
        padding-right: 0;
    }
}

.content-area .topic {
    margin-top: -3rem;
    padding-bottom: 0;
    margin-bottom: 0;
}

.content-area .table-scroll-wrapper:last-child {
    margin-bottom: -3.5rem;
}

.content-area h1.title:first-of-type {
    width: calc(100% - 88px);
}

.content-area #version-select {
    display: none;

    @media (max-width: 768px) {
        margin: -2rem 1rem 2rem 1rem;
        width: calc(100% - 2rem);
        display: block;
    }
}

.content-footer {
    padding: 0 16px;
}

.right-nav {
    margin-top: 1rem;

    @media (max-width: 1200px) {
        display: none;
    }
}

@media (max-width: 1024px) {

    .dita-content-container,
    .openapi-content-container {
        position: relative;
    }
}

.feedback-form {
    margin: 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-soft);
}

.splunk-feedback-trigger {
    display: flex;
    gap: 20px;
    align-items: center;

    @media (max-width: 768px) {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
        margin-bottom: 8px;
    }
}

.label-feedback {
    font-weight: bold;
}

#splunk-feedback-toggle {
    border-radius: 3px;
    background: transparent;
    padding: 10px 16px;
    border: 1px solid;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

.splunk-feedback-container {

    input,
    select,
    textarea {
        background-color: white;

        &:focus {
            border-color: var(--splunk-darkgrey);
            outline: none;
            --pico-box-shadow: none;
        }
    }
}

#splunk-feedback-submit {
    color: white;
    font-size: 17px;
    text-align: center;
    background-color: rgb(206, 0, 112);
    border-radius: 3px;
    padding: 10px 32px;
    margin: 0px 5px 5px 0px;
    cursor: pointer;
}

.next-prev-links {
    margin-top: 2rem;
}

/* elments created by lib-yaml.min.js are not wrapped in .table-scroll-wrapper and need to be scrollable themselves */
.content-body {

    .instrumentation-yaml,
    .metrics-config-yaml,
    .metrics-component-yaml,
    .metrics-yaml,
    .metrics-table,
    .metrics-standard-yaml {
        table {
            display: block;
            overflow-x: auto;
            width: 100%;
        }
    }
}

.collapsible {
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    margin: 1em 0;
    padding: 1em;
    position: relative;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.collapsible-toggle-button {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 1em;
    white-space: nowrap;
}

.collapsible-content {
    display: none;
    margin-top: 1em;
}

p.subhead,
span.ph.b {
    font-weight: 700;
}

/* yes, h3 is a class name here. It's used in Splunk's dita content */
p.h3,
.section.h3 .title {
    font-size: 18px !important;
    font-weight: bold !important;
}

p.h4,
.section.h4 .title {
    font-size: 16px !important;
    font-weight: bold !important;
}

.content-body .shortdesc,
.content-area .shortdesc,
.dita-content-container .shortdesc {
    display: none !important;
}

.custom-list-first {
    font-weight: bold;
}

.section .custom-list>.custom-list-indent {
    padding-left: 35px;
}

.table.search thead th {
    background: #5BC05C !important;
}

.code-block-wrapper {
    width: 100%;
    max-width: 700px !important;
}

code {
    max-height: 315px;
    text-wrap: wrap;
}

.codeblock-search-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-block: 1rem;
}

.codeblock-search-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    background: #5BC05C;
    color: white;
    padding: 5px;
    cursor: default;
    border-radius: 0;
}

@media (min-width: 1025px) {

    .main-content-container:has(.toc-subtree),
    .main-content-container:has(.related-links) {
        grid-template-columns: 344px 1fr 270px !important;
    }
}