// Overrides for Patternfly 4 components

:root {
    //   --pf-v6-global--FontFamily--sans-serif: "Red Hat Text", "Overpass", Helvetica, sans-serif !important;
    --pfe-theme--font-size: 14.54545454px !important;
}

.pf-v6-c-backdrop {
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(3, 3, 3, 0.619608);
    box-sizing: border-box;
    color: rgb(21, 21, 21);
    z-index: 9999;

    .pf-v6-c-modal-box {
        max-width: 90%;

        @media (min-width: 992px) {
            max-width: 75%;
        }

        @media (min-width: 1320px) {
            max-width: 50%;
        }

        .pf-v6-c-title {
            margin-bottom: 1rem;
            font-size: 20px;
        }

        .pf-v6-c-modal-box__body {
            margin-top: 0;
            margin-bottom: 0;

            p {
                margin-bottom: 0;
            }
        }

        .pf-v6-c-modal-box__footer {
            margin: 0;

            button:first-child {
                margin-right: 1rem;
            }
        }

        // feedback form specific overrides
        &.feedback-modal {
            .pf-v6-c-title {
                margin-bottom: 1.5rem;
            }

            .pf-v6-c-modal-box__body {
                fieldset {
                    display: -ms-flexbox;
                    display: flex;
                    -ms-flex-direction: column;
                    flex-direction: column;
                }

                legend {
                    margin-bottom: 0.5rem;
                    font-weight: bold;
                    color: rgb(21, 21, 21);
                }

                .radio-inline + .radio-inline,
                .checkbox-inline + .checkbox-inline {
                    margin-left: 0;
                }

                .radio input[type='radio'],
                .radio-inline input[type='radio'],
                .checkbox input[type='checkbox'],
                .checkbox-inline input[type='checkbox'] {
                    position: initial;
                    margin-right: 0.2rem;
                    padding-left: 22px;
                }

                textarea {
                    max-height: 250px;
                }

                @media (min-width: 732px) {
                    fieldset {
                        display: block;
                    }

                    .radio-inline + .radio-inline,
                    .checkbox-inline + .checkbox-inline {
                        margin-left: 1.2rem;
                    }
                }
            }
        }
    }

    .pf-modal-overflow-visible .pf-v6-c-modal-box__body {
        overflow: visible !important;
    }
}

.pf-v6-c-divider {
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.non-bold-alert.pf-v6-c-alert .pf-v6-c-alert__title {
    font-weight: normal !important;
}

.pf-v6-c-alert {
    margin-top: 24px;
    .pf-v6-c-alert__title {
        font-weight: 600 !important;
        font-size: 15px;
    }

    .pf-v6-c-alert__description .restore-session-list {
        margin-bottom: 0;
        padding-left: 0;
        list-style: none;

        li {
            margin-bottom: 0.2rem;

            &:last-child {
                margin-bottom: 0;
            }
        }

        .restore-session-summary {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            max-width: 98%;
        }

        .restore-session-questions {
            display: -ms-flexbox;
            display: flex;
            -ms-flex-align: baseline;
            align-items: baseline;
            font-size: 14px;

            label {
                font-weight: 400;
            }

            & > button {
                padding: 0 10px;

                &:hover svg {
                    color: var(--pf-v5-global--palette--blue-500) !important;
                }
            }
        }
    }

    .pf-v6-c-alert__action {
        button {
            padding: 6px 12px;
            background: transparent;
            font-size: 16px;
            text-shadow: 0 1px 0 #fff;
        }
    }

    &.pf-v6-c-alert.pf-m-inline {
        --pf-v6-c-alert--m-inline--before--BackgroundColor: #39a5dc;

        .pf-v6-c-alert__description > * {
            margin-bottom: 0;
        }
    }
}

#rh-support-case {
    .pf-v6-c-expandable-section {
        .pf-v6-c-expandable-section__content {
            margin-top: 0 !important;
            padding: 10px 5px;
            border: 1px solid #d2d2d2;
            border-top: none;
        }

        .pf-v6-c-expandable-section__toggle {
            font-size: 16px;

            .pf-v6-c-expandable-section__toggle-text {
                margin-left: 8px;
                font-weight: 500;
            }
        }
    }
}

.pf-v6-c-accordion {
    padding: 0;
    margin: 0;
    .pf-m-expanded ul {
        list-style-type: none; //Because, FF
    }

    h3 {
        margin-bottom: 0;
        margin-top: 0;

        .pf-v6-c-accordion__toggle {
            .pf-v6-c-accordion__toggle-text {
                font-size: 16px;
            }

            &.pf-m-expanded {
                .pf-v6-c-accordion__toggle-text {
                    font-weight: 600;
                }
            }
        }
    }
}

.critical-solutions-modal {
    &.pf-v6-c-modal-box {
        max-width: 60% !important;

        .pf-v6-c-modal-box__body {
            margin-bottom: 0;
            padding-top: 0.5rem;
            padding-bottom: 0;
        }
    }

    .pf-v6-c-accordion {
        h3 {
            margin-top: 0;
        }

        .pf-v6-c-accordion__toggle {
            padding: 0.8rem 1rem;

            .pf-v6-c-accordion__toggle-text {
                overflow: visible;
                max-width: 95%;
                white-space: normal;
                text-align: left;
                font-size: 15px;
                display: flex;
                align-items: center;
                letter-spacing: 0.2px;
            }
        }

        .pf-v6-c-accordion__expanded-content-body {
            padding: 1rem 1.5rem;

            & > *:not(.ea-rule) .cta-link {
                padding: 0 0.8rem;
                border: none;
                font-size: 14px;
                font-weight: 700;
            }
            .cta-link::after {
                border: 0;
                margin-left: 0 !important;
            }
        }

        .pf-v6-c-accordion__toggle-text .pf-v6-c-label {
            font-weight: 400;
            padding: 4px 8px;
            line-height: 21px;
        }
    }
}

.pf-v6-c-alert-group {
    list-style: none;
}

.popular-solutions {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    border-radius: var(--global-border-radius-small, 6px) var(--global-border-radius-small, 6px) 0px 0px !important;

    .card-title {
        font-weight: 700;
    }
    div > button > span > svg {
        color: white !important;
    }
    .file-recs-actions-toggle {
        color: white !important;
    }
}

.popular-solutions-toggle-button {
    padding-right: 5px;
    margin-top: 2px;
}

.file-diag > .card-heading {
    display: flex;
    -ms-flex-align: center;
    margin-bottom: 0;
    padding: 0.5rem 0.8rem;
    font-size: 15px;
    border: 1px solid var(--pf-t--color--gray--50);
    color: var(--pf-t--color--white);
}

.file-diag .file-buttons .pf-v6-c-switch .pf-v6-c-switch__label {
    padding-left: 10px;
    font-size: 15px;
}

#cve-card .pf-v6-c-card__header-main {
    display: flex;
    gap: 5px;
}

.common-suggestions {
    position: relative;
}

.common-suggestions .PFElement h3 button[aria-expanded='false']::after {
    top: 20px !important;
}

.pf-v6-c-button.pf-m-secondary[disabled]::after {
    border: 0;
}

.pf-v6-c-button .pf-m-active {
    color: #06c;
}

.pf-v6-c-button.pf-m-primary {
    color: var(--pf-v6-c-button--Color);
}

.pf-m-aria-disabled {
    color: var(--pf-v6-c-button--disabled--Color) !important;
}

// Override disable color on darker backgrounds
.case-overview-secondary,
#review {
    .pf-v6-c-select__toggle.pf-m-disabled,
    .pf-v6-c-select__toggle:disabled {
        --pf-v5-c-select__toggle--Color: #ccc;
        --pf-v5-c-select__toggle--BackgroundColor: #fff;
    }
}

// Override PFE Collapse discloser = false
div.common-suggestions pfe-accordion {
    --pfe-accordion--FontSize--header: 16px;
    --pfe-accordion--FontWeight--header: 600;
}

// Override PFE Collapse discloser = false
section.grid-aside-content pfe-accordion {
    --pfe-accordion--FontSize--header: 16px;
    --pfe-accordion--FontWeight--header: 600;
}

div.pf-v6-c-modal-box__body label.pf-v6-c-switch {
    padding: 1rem;
}
// override added padding
div.pf-v6-c-alert__description div.ea-rule p a.pf-v6-c-button {
    padding: 0;
}

//override pfe-accordion discloser for modal
div pfe-accordion {
    --pfe-accordion--FontSize--header: 18px;
    --pfe-accordion--FontWeight--header: 300;
    border: none !important;
    box-shadow: none !important;
}

section div.file-recommendations {
    padding: 0 !important;
}

section div.file-recommendations h5 {
    margin: 0 !important;
}

section div.file-recommendations h5 span div.pf-v6-c-label-group {
    display: flex;
}

div input.pf-v6-c-form-control.pf-m-search {
    background-image: none;
}
// To override font weight in CEP Form - PCM-11644
div#cep-details-modal.pf-v6-c-modal-box__body {
    form.pf-v6-c-form.push-top-narrow {
        div.pf-v6-c-form__group {
            div.pf-v6-c-form__group-label {
                label.pf-v6-c-form__label {
                    span.pf-v6-c-form__label-text {
                        font-weight: 600 !important;
                    }
                }
            }
        }
    }
}

// To override font weight in Request Escalation Form - PCM-11644
div#request-mgmt-escalation-modal.request-escalation-modal {
    div.pf-v6-c-modal-box__body {
        form.pf-v6-c-form.request-escalation-form {
            .pf-m-textarea textarea {
                resize: none !important;
            }

            div.pf-v6-l-grid.pf-m-all-12-col-on-md.pf-m-gutter {
                div.pf-v6-l-grid__item.pf-m-6-col {
                    div.pf-v6-c-form__group {
                        div.pf-v6-c-form__group-label {
                            label.pf-v6-c-form__label {
                                span.pf-v6-c-form__label-text {
                                    font-weight: 600 !important;
                                }
                            }
                        }
                    }
                }
                div.pf-v6-c-form__group {
                    div.pf-v6-c-form__group-label {
                        label.pf-v6-c-form__label {
                            span.pf-v6-c-form__label-text {
                                font-weight: 600 !important;
                            }
                        }
                    }
                }
            }
        }
    }
}

// To override font weight on reopen case modal - PCM-11644
#case-reopen-modal {
    form.pf-v6-c-form.case-reopen-modal-form {
        div.pf-v6-c-form__group {
            div.pf-v6-c-form__group-label {
                .pf-v6-c-form__label {
                    .pf-v6-c-form__label-text {
                        font-weight: 500 !important;
                    }
                }
            }
        }
    }
}

pfe-accordion {
    box-shadow: inset 1px 1px 0px #d2d2d2, inset -1px -1px 0px #d2d2d2;
}

.pf-v6-c-wizard__main,
.pf-v6-c-wizard__footer,
.pf-v6-c-wizard__nav {
    z-index: 1 !important;
}

nav.pf-v6-c-wizard__nav.pf-m-expanded {
    position: absolute;
    left: 0;
    z-index: 2 !important;
    background: #fff;
    width: 100%;
}

.pf-v6-c-options-menu__menu {
    z-index: 9 !important;
}

#tc-product-dropdown-selector {
    .pf-v6-c-select__menu {
        z-index: 90 !important;
    }
}

div.case-details-summary {
    margin-bottom: 1.5rem;
}

.all-product-selector-dropdown .pf-v6-c-select__menu-group-title:empty {
    display: none;
}

.update-info-button {
    --pf-v6-c-button--BackgroundColor: #fff;
    --pf-v6-c-button--hover--BackgroundColor: #ededed;
    --pf-v6-c-button--active--BackgroundColor: #ededed;
    --pf-v6-c-button--focus--BackgroundColor: #ededed;
}

.submit-case-check-icon {
    margin-right: 1rem;
    margin-top: 24px !important;
}

.file-upload-group {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

.pf-v6-c-alert p {
    margin-bottom: 0;
}

.pf-v6-c-label-group__list {
    margin-bottom: 0;
}

.pf-v6-c-panel__main-body {
    padding: 0;
}
.pf-v6-c-form-control textarea,
.pf-v6-c-form-control input {
    outline: none;
    &:focus {
        border-bottom-color: #06c;
    }
}

.pf-v6-c-wizard__main {
    padding: 0 !important;
}
.pf-v6-c-card {
    header {
        font-weight: 500;
    }
}

ul.pf-v6-c-tabs__list {
    margin-bottom: 0px;
}

ul.pf-v6-c-chip-group__list {
    margin: 0px;
}

span.pf-v6-c-input-group__text {
    display: inline-flex;
    width: 100%;
}

.bookmark-search-dropdown-wrapper {
    div.pf-v6-c-dropdown__toggle.pf-m-split-button.pf-m-action {
        width: 100%;
    }
}

.pf-v6-c-list {
    padding: 0;
}

.product-selector-group {
    .pf-v6-c-select__menu-group-title {
        font-weight: 800;
    }
}

.top-content-suggestion-accordion {
    margin-top: 32px;
    dl dt {
        margin: 0px;
    }
    .pf-v6-c-accordion.pf-m-bordered {
        margin: 0px;
        padding: 0px;
    }

    border: 1px solid #d2d2d2;
    border-radius: var(--global-border-radius-small, 6px);
}

.top-recommendations {
    border: 1px solid #d2d2d2 !important;
    border-radius: var(--global-border-radius-small, 6px);
    margin-top: 16px;

    --pfe-accordion--BorderColor: transparent;
    --pfe-accordion--BorderWidth: 0;
    --pfe-accordion--BoxShadow: 0 0 0 transparent;
}

.top-recommendations pfe-accordion-header[expanded] + pfe-accordion-panel {
    border-bottom: 1px solid #d2d2d2;
    padding-bottom: 0.5rem;
}

.contact-select {
    font-weight: normal !important;

    input::placeholder,
    .pf-v6-c-select__toggle-typeahead::placeholder {
        font-weight: normal !important;
    }
}

.escalation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.top-content-card-wrapper {
    background-color: transparent !important;
}
.pf-v6-c-alert__title {
    margin-bottom: 0px;
}

.restore-session-alert {
    .pf-v6-c-alert__icon {
        font-size: 18px;
    }
    .pf-v6-c-alert__description {
        margin-top: 0px;
    }
}

#cep-details-modal {
    .pf-v6-c-form__label-text {
        font-weight: 500;
    }
}

.file-recommendations-file-upload-alert {
    .pf-v6-c-alert__icon {
        margin-top: 5px;
    }
}

.close-case-modal-form {
    .pf-v6-c-form__label {
        .pf-v6-c-form__label-text {
            font-weight: 500 !important;
        }
    }
}

.pf-v6-c-modal-box__title {
    margin-bottom: 0px;
    padding: 5px;
}

div.related-tasks-search-input-container#related-tasks-search-container {
    float: right;
    margin-bottom: 1rem;
}

.related-tasks-search-input {
    width: 25rem;
}

button.pf-v6-c-toggle-group__button {
    z-index: 1;
}

.top-content-suggestion-accordion {
    .pf-v6-c-accordion .pf-v6-c-accordion__toggle {
        padding: 0.5rem 1rem !important;
    }
    .pf-v6-c-accordion__toggle-text h3 {
        font-size: 17px !important;
        font-weight: 600;
    }
    .pf-v6-c-accordion__expandable-content-body {
        padding-top: 4px;
        padding-bottom: 4px;
    }
    h3 {
        color: black;
    }
}

.file-diag-selected {
    .file-description.form-control {
        border: 1px solid #f0f0f0;
        box-shadow: none;
        border-bottom: 1px solid #6a6e73;
        color: var(--pf-v6-c-form-control--Color);
        &::-webkit-input-placeholder {
            color: var(--pf-v6-c-form-control--m-placeholder--Color);
        }
    }
    .text-muted {
        color: var(--pf-v6-c-helper-text__item-icon--m-indeterminate--Color);
    }
}

button.pf-m-plain.manage-bookmark-info-icon-button {
    --pf-v6-c-button--PaddingInlineEnd: var(--pf-t--global--spacer--xs);
    --pf-v6-c-button--PaddingInlineStart: var(--pf-t--global--spacer--xs);
    --pf-c-button--m-plain--Color: var(--pf-v5-global--palette--black-900);
    color: var(--pf-v5-global--palette--black-900);
}

.case-detail-collapse-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--pf-t--global--text--color--link--default);
    font-size: var(--pf-t--global--font--size--md);
    font-weight: 500;
    cursor: pointer;
    padding: 10px;
    margin-bottom: 16px;
    p.case-detail-collapse-label {
        margin-bottom: 0;
    }
    svg {
        height: 1.5rem;
        width: 1.5rem;
    }
}

.sidebar-header-container {
    padding: 24px;
}

.case-detail-collapse-panel:hover {
    background-color: #dedede;
    border-radius: 8px;
}

.sidebar-header .case-detail-collapse-panel:hover {
    background-color: transparent;
    border-radius: 0;
    margin-top: 16px;
}

.sidebar-header .case-detail-collapse-panel {
    margin: 16px;
}

.top-content-accordion {
    margin-bottom: 0px !important;
}
label.react-typeahead-label-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    .react-select-custom,
    .partner-share-bootstrap-typeahead,
    .rbt-input-multi .rbt-input-wrapper,
    p.form-instructions {
        font-weight: var(--pf-t--global--font--weight--body--default);
    }
    .rbt-token.rbt-token-removeable {
        color: var(--pf-v5-global--palette--blue-400);
    }
    .rbt-token.rbt-token-removeable.rbt-token-active {
        color: #ffffff;
    }
    &:has([aria-expanded='true']) {
        height: 350px;
    }
}
#case-history-paginated-timeline-pagination-bottom-pagination {
    justify-content: flex-start;
    background-color: var(--pf-v5-global--palette--black-200);
}

.case-public-private-link {
    padding: 0.5rem;
}

a.case-resource-recommendation-link {
    padding: 0.5rem;
    padding-left: 0px;
}

.title-summary-counter,
.cluster-ID-counter {
    display: inline-flex;
    font-size: smaller;
    font-weight: 400;
}

.cluster-ID-counter {
    margin-left: auto;
}

.description-textarea {
    resize: vertical !important;
    &.pf-v6-c-form-control {
        &:disabled,
        &.kt1-disabled {
            resize: none !important;
            &::after,
            &:after {
                border-block-end: none !important;
            }
        }
    }
}

.kt1-disabled {
    background-color: #f0f0f0 !important;
}

.issue-title-disabled {
    background-color: #f0f0f0 !important;
}

.kt-progress-bar {
    padding-top: 1em;
}

.title-summary-error {
    margin-top: -8px !important;
}

.extra-tips-for-describing {
    display: block;
}

.star-icon-info {
    color: var(--pf-v5-global--palette--blue-400);
}

.badge-icon-info {
    background-color: var(--pf-v5-global--palette--blue-50);
    font-weight: 400;
}

.popover-body-info-description {
    max-width: 494px;
}

.edit-question span.form-control {
    padding: 0;
    margin-bottom: 1rem;
}
div.case-details-tabs pre {
    background-color: white;
}

.get-support-summary-input {
    margin-bottom: 1rem;
}

.case-creation-severity-select {
    max-width: min-content !important;
}

.pf-v6-c-alert__description {
    color: #000000;
}

.pf-v6-c-card__header.pf-v6-u-display-flex > .pf-v6-c-card__header-toggle {
    align-self: center;
}

.pf-v6-c-button.secondary-button-pill {
    border-radius: var(--pf-t--global--border--radius--400);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.pf-v6-c-alert {
    margin-top: 0;
}

.pf-v6-c-wizard__nav {
    border-radius: 0 0 0 16px !important;
}

.pf-v6-c-wizard__outer-wrap {
    border-radius: 16px !important;
}

.external-case-contact-selector,
#open-case-notifications,
#get-support-reference-number {
    .pf-v6-c-text-input-group__text {
        font-size: 14px !important;
        font-weight: 400 !important;
    }
}

.case-details-ref-number {
    input#case-details-reference-number {
        outline-offset: var(--pf-v6-c-text-input-group__text-input--OutlineOffset) !important;
        border-radius: 8px !important;
    }
}
