.ContractDetail {
    margin-bottom: 50px;

    .SuiteSection-top > .SuiteSection-body {
        box-shadow: 4px 4px 8px 2px rgba(13 36 53 / 4%);
    }

    h3 {
        display: inline-block;
        margin-bottom: 1%;
    }

    .FormField-label {
        margin-bottom: 1%;
    }

    .table {
        border-bottom: none;
        border-top: 1px solid var(--gray-400);
    }

    .container {
        margin-left: 0;
        padding-left: 0;
    }

    .DistributionList {
        position: relative;
        overflow: auto;
        top: 30px;
    }

    &-advance-section,
    &-flowthrough-section,
    &-PhysicalReserve,
    &-Notes {
        margin-top: 20px;
    }

    &-PhysicalReserve,
    &-Notes {
        &-Edit {
            border-radius: var(--radius-max, 99999px);
            background: var(--midnight-150, #d2e3f8);
            padding: 8px;
        }
    }

    &-Notes {
        &-text {
            white-space: pre-wrap;
        }
    }

    // This CSS is currently required for the Solfege
    // PageHeader component to ensure proper alignment
    // and spacing. See PR 1893 for details.
    &-header {
        &.SuitePageHeader {
            row-gap: 12px;
        }

        &-label label.form-label {
            color: var(--gray-700);
            font-size: 12px;
            letter-spacing: normal;
            margin-bottom: 0;
            text-transform: none;
        }

        &-links {
            align-items: center;
            display: flex;
            gap: 8px;
        }

        &-main-content {
            grid-column: span 2;
        }

        &-metadata {
            display: flex;
            gap: 8px;
            grid-column: span 2;
        }
    }

    // Added below css to align contractId, contractName and Status
    &-page-header {
        align-items: flex-start;
        display: flex;
        width: 100%;
    }

    &-info {
        display: flex;
        line-height: 32px;

        &-contractName {
            line-height: 32px;
            margin-bottom: 0;

            // Added this to override css added on line 801 and to vertically align the contract name with the contract id
            .TruncatedText {
                display: inline !important;
            }
        }

        &-contractId {
            .dotIcon {
                align-items: center;
                display: flex;
                float: left;
                padding: 8px;
                height: 32px;

                .DotGlyphIcon {
                    color: var(--gray-700);
                }
            }

            .id {
                color: var(--gray-700);
                float: left;
                font-size: 24px;
                line-height: 32px;
            }
        }

        &-status {
            margin-left: 6px;
        }
    }

    &-stores {
        h3 {
            margin-top: 30px;
        }
    }

    &-custom-edit-btn {
        float: right;
        font-size: 15px;
    }

    &-edit-btn {
        display: block;
        float: right;
    }

    &-ContractTerm-detail {
        margin-top: 15px;
    }

    &-vendor-catalog {
        margin-bottom: 3%;
        margin-top: 3%;
    }

    .overflowed-col {
        margin-top: 2%;
    }

    &-Terms {
        margin-top: 30px;
    }

    .MechanicalDeduction,
    .ContractNote {
        &-edit-btn {
            display: block;
            float: right;
        }

        &-custom-edit-btn {
            display: block;
            float: right;
            font-size: 15px;
        }

        &-details {
            padding: 27px 5px;
        }

        &-header-block {
            display: inline-block;
        }

        &-link {
            padding-left: 10px;
        }

        &-custom-link {
            display: block;
            float: right;
            font-size: 15px;
        }
    }

    .BaseTerm-attachment {
        margin-bottom: 25px;
    }

    .ContractTermLabelName {
        display: inline-block;
        margin-right: 5px;

        &:not(:last-child)::after {
            content: ',';
        }
    }

    &-Contract-Mechanical-Deduction,
    &-Contract-Mechanical-Deductions,
    &-Terms-block,
    &-MechanicalDeduction,
    &-Summary {
        border: 1px solid var(--gray-300);
        border-radius: 3px;
        margin-top: 20px;
        padding: 20px;

        h3 {
            margin-top: 0;
        }
    }

    &-top {
        &-header {
            display: flex;
            align-items: center;
            width: 100%;

            h2 {
                margin-bottom: 0;
            }
        }

        &-status {
            margin-left: 10px;
        }

        &-buttons {
            margin-left: auto;

            button {
                margin-right: 12px;
            }
        }

        &-HistoryReportsButton {
            position: absolute !important;
            right: 0;
        }

        &-HistoryReportsModal {
            &-Links {
                &-LinkContainer {
                    padding: 8px 4px;
                    width: 100%;

                    &-Link .GlyphIcon {
                        color: var(--anchor-default);
                    }

                    &:not(:first-child) {
                        border-top: 1px solid var(--gray-300);
                    }
                }
            }
        }
    }

    &-general-details {
        border: 1px solid var(--gray-300);
        border-radius: 3px;
        margin-top: 20px;
        padding: 20px;

        .PageCol .container {
            margin-top: 10px;
        }

        &-editButton {
            align-items: center;
            border-radius: var(--radius-max, 99999px);
            background: var(--midnight-150, #d2e3f8);
            display: flex;
            float: right;
            justify-content: center;
            gap: 6px;
            padding: 8px;
        }

        &-header-block {
            display: inline-block;
        }

        &-highlight {
            display: inline-flex;
            margin-left: var(--padding-extra-small);
        }

        &-row {
            margin-top: 20px;
        }

        .PageGrid {
            column-gap: 40px;
            margin-top: 20px;
        }

        @media (max-width: 1500px) {
            .col-2 {
                padding-left: 0;
            }
        }
    }

    .Summary-note-content {
        white-space: pre-line;
    }

    .ContractCountriesTable,
    .ContractStoresTable {
        /* stylelint-disable max-nesting-depth */

        &-header {
            label {
                font-size: 14px;
            }
        }
        /* stylelint-enable max-nesting-depth */

        &-deliveringServices,
        &-nonDeliveringServices,
        &-deliveringCountries,
        &-nonDeliveringCountries {
            float: left;
            width: 50%;
        }

        &-country,
        &-store {
            border-bottom: 1px solid var(--gray-200);
            padding-left: 14px;
            padding-top: 16px;
        }

        &-countriesList,
        &-storesList {
            border: 1px solid var(--gray-300);
            height: 400px;
            overflow-y: auto;

            ul {
                font-size: 14px;
                list-style: none;
                padding-left: 14px;
            }
        }
    }

    .ContractTermConditionsCondition {
        padding-bottom: 10px;
        padding-top: 10px;

        &:not(:first-child) {
            border-top: 1px solid var(--gray-300);
        }
    }

    .ContractTermConditionsTable {
        &-body {
            display: table;
            margin-left: 0;
            width: 100%;
        }

        &-column {
            padding: 0;
        }

        &-header {
            border-bottom: 1px solid var(--gray-300);
            &-Catalog > .FRCLabel {
                justify-content: center;
            }
        }

        &-item {
            border-bottom: 1px solid var(--gray-300);
        }
    }

    .TermConditionIndex,
    .TermConditionCatalog,
    .Contributors {
        padding-bottom: 10px;
        padding-top: 10px;
    }

    .TermConditionIndex {
        background: var(--gray-100);
    }

    .TermConditionConditions {
        border: 1px solid var(--gray-300);
        border-bottom: none;
        border-top: none;
    }

    .EditLink {
        align-items: center;
        display: flex;
        justify-content: center;
    }

    .ExceptionLink {
        margin: 30px 0;
    }

    .NewTermLink {
        font-size: 12.5px;
        font-style: normal;
        font-weight: 500;
    }

    .NoResultsFound {
        margin: 20px 0;

        &-link {
            margin-left: 11px;
        }
    }

    .Product {
        margin-top: 4px;

        &-upc {
            color: var(--gray-500);
            font-style: italic;
        }
    }

    .Track {
        margin-top: 4px;

        &-isrc {
            color: var(--gray-500);
            font-style: italic;
        }
    }

    .Distribution-Edit {
        float: right;
    }

    .Contributions {
        &-list-icon {
            display: inline-flex;
            margin-left: 5px;

            .LoadingSpinner-inner {
                height: 15px;
                width: 15px;
            }
        }
    }

    &-Contributors,
    &-NRTerms {
        .btn {
            float: right;
        }

        &-list {
            margin-top: 1%;
        }
    }

    .ContractMechanicalDeductions {
        &-customCard {
            margin-top: 20px;
        }

        &-customCardBody {
            padding: 20px;
        }

        &-customCardTitle {
            text-transform: capitalize;
        }

        &-customCardSubtitle {
            font-size: 1.2rem;
            font-weight: 400;
        }

        &-mechanicalDeductionCard-territoryCol {
            padding: 0;
            align-content: center;
        }

        &-mechanicalDeductionCard-buttonCol {
            display: flex;
            justify-content: flex-end;
            padding: 0;
        }

        &-mechanicalDeductionCard-territoryText {
            font-size: 21px;
            font-style: normal;
            font-weight: normal;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        &-mechanicalDeductionCard-cardTextBody {
            padding-bottom: 10px;
        }

        &-mechanicalDeductionCard-territoryWarningIcon {
            color: var(--warning-650, #d17300);
        }

        &-mechanicalDeductionCard-mechanicalTypesText {
            font-size: 16px;
            font-style: normal;
            font-weight: 400;
        }

        &-mechanicalDeductionCard-paidByText {
            font-size: 14px;
            font-style: normal;
            font-weight: 400;
        }

        &-mechanicalDeductionCard-editButton {
            align-items: center;
            border-radius: 99999px;
            background: var(--midnight-150, #d2e3f8);
            display: flex;
            float: right;
            justify-content: center;
            gap: 6px;
            padding: 8px;
            margin-right: 10px;
        }

        &-mechanicalDeductionCard-deleteButton {
            align-items: center;
            border-radius: 99999px;
            background: var(--container-fills-backgrounds-semantics-error);
            display: flex;
            float: right;
            justify-content: center;
            gap: 6px;
            padding: 8px;
        }
    }

    .ContractTermsConditions {
        &-customCardBody {
            padding-top: 25px;
        }

        &-customAddButtonColumn {
            text-align: right;
        }

        &-customCardTitle {
            text-transform: capitalize;
        }

        &-customCardSubtitle {
            font-size: 1.2rem;
            font-weight: 400;
        }

        &-tableRowHeader {
            text-align: left;
            padding-top: 10px;
            padding-bottom: 10px;
            text-transform: uppercase;
        }

        &-tableRowEditButtonRow {
            text-align: center;
            padding-top: 0.12rem;
            .btn {
                font-size: 15px;
            }
        }

        &-presentational {
            &-header {
                gap: 2px;
                width: 100%;
            }
        }
        &-gridTable {
            &-customHeaderCell {
                flex-direction: row-reverse;
                display: flex;
                width: 100%;
            }
            &-cell {
                white-space: pre-wrap;
                display: flex;
                flex-direction: column; /* Aligns text to the top */
                justify-content: flex-start; /* Aligns content to the top */
                height: 100%; /* Ensures full height usage */
            }
        }

        &-labelInfoBlock {
            &-presentationalGroups {
                width: calc(100% + 30px);
                height: calc(100% + 30px);
                margin-right: -15px;
                margin-left: -15px;
            }
            &-detail {
                &-header {
                    gap: 2px;
                    width: 100%;
                    .h3 {
                        font-size: 18px;
                    }
                }

                &-buttons {
                    display: flex;
                    gap: 8px;
                }
                &-edit {
                    align-items: center;
                    border-radius: var(--radius-max, 99999px);
                    background: var(--midnight-150, #d2e3f8);
                    display: flex;
                    float: right;
                    justify-content: center;
                    gap: 6px;
                    padding: 8px;
                }
                &-sectionHeader {
                    .h3 {
                        font-size: 16px;
                        font-weight: 700;
                    }
                }
                &-sidecarButton {
                    align-items: center;
                    border-radius: var(--radius-max, 99999px);
                    background: var(--midnight-150, #d2e3f8);
                    display: flex;
                    float: right;
                    justify-content: center;
                    gap: 6px;
                    padding: 8px;
                }
            }
        }

        &-contractTermName {
            font-weight: 500;
        }
    }
    &-Contributors {
        margin-top: 2%;
    }

    &-NRTerms {
        margin-bottom: 20%;
        margin-top: 3%;

        &-block {
            border: 1px solid var(--gray-300);
            border-radius: 3px;
            margin-top: 20px;

            .header {
                padding: 14px;

                h3 {
                    margin-top: 0;

                    span {
                        font-weight: normal;
                    }
                }

                .btn {
                    float: right;
                    margin-top: 0;
                }
            }
        }

        &-detail {
            margin-bottom: 0;

            .main-cell {
                border-right: 1px solid var(--gray-400);
                border-bottom: 1px solid var(--gray-200);
            }

            td {
                padding: 6px 14px;
            }

            thead td {
                border-bottom: 1px solid var(--gray-400) !important;
            }

            .form-label {
                margin-bottom: 0;
            }
        }
    }

    &-noContributors,
    &-noNRTerms {
        color: var(--gray-600);
        left: 23%;
        margin-top: 1%;
        position: absolute;
        text-align: center;
        width: 50%;
    }

    .ContractContributors-list-table {
        border-top: 1px solid var(--gray-400);
        min-height: 150px;
        max-height: 420px;
        overflow-y: auto;
    }

    &-Contributors-list {
        table {
            border-top: none !important;
        }

        th {
            background-color: var(--white);
            border-bottom: none !important;
            box-shadow: inset 0 -1px 0 var(--gray-400);
            padding: 6px !important;
            position: sticky;
            top: 0;
            z-index: 1;
        }
    }

    .AutoAdd {
        font-size: 12px;
        padding-left: 1em;

        &-container {
            align-items: center;
            display: inline-flex;
        }

        &-text {
            padding: 4px;
        }
    }

    .CheckGlyphIcon {
        color: var(--success);
    }

    .AccountInfo {
        background-color: var(--gray-100);

        &-div {
            padding: 20px;
        }

        &-label {
            color: var(--gray-900);
            line-height: 22px;
        }

        &-name {
            padding: 10px 0;
        }

        &-paid-by {
            padding: 10px 0;
        }
    }

    .TruncatedText {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
        white-space: nowrap;
    }

    &-renewal-section {
        border: 1px solid var(--gray-300);
        border-radius: 3px;
        margin-top: 20px;
        padding: 20px;

        .PageCol .container {
            margin-top: 10px;
        }

        &-header-block {
            display: inline-block;
        }

        &-row {
            padding-top: 20px;
            margin-top: 20px;
        }

        &-description {
            margin-top: 20px;
        }

        &-editable {
            &-empty {
                display: flex;
                justify-content: space-between;
            }
        }
    }

    .flowthrough-automatic-shutoff-label,
    .flowthrough-rate-label {
        display: flex;

        &-text {
            float: left;
        }

        &-tooltip {
            float: left;
            margin: -1.4px 0 0 3px; // This is added to align help tooltip with label text.
        }
    }

    .flowthrough-status {
        display: flex;

        &-text {
            padding: 1px 4px;
        }

        &-shutoff-text {
            color: var(--gray-700);
            margin-left: 4px;
        }

        &-active .DotGlyphIcon {
            color: var(--success-750);
        }

        &-paused .DotGlyphIcon {
            color: var(--warning-600);
        }

        &-shutoff .DotGlyphIcon {
            color: var(--error-600);
        }
    }

    .flowthrough {
        &-alert {
            align-items: center;
            display: flex;
            gap: 4px;

            &-info .InfoGlyphIcon {
                color: var(--info-650);
            }

            &-text {
                color: var(--gray-700);
                margin-top: 2px;
            }
        }

        &-border {
            border-top: 1px solid var(--dividers-light-stroke, --gray-150);
            padding-bottom: 12px;
        }
    }

    &-flowthrough {
        &-editButton {
            align-items: center;
            border-radius: var(--radius-max, 99999px);
            background: var(--midnight-150, #d2e3f8);
            display: flex;
            float: left;
            justify-content: center;
            gap: 6px;
            padding: 8px;
        }

        &-deleteButton {
            align-items: center;
            border-radius: var(--radius-max, 99999px);
            background: var(--red-300);
            display: flex;
            float: right;
            justify-content: center;
            gap: 6px;
            margin-left: 6px;
            padding: 8px;
        }

        &-details {
            padding-top: 5px;
        }
    }

    &-Summary {
        &-header-text {
            margin-top: 2px;
        }

        &-header,
        &-notes,
        &-notes-header,
        &-notes-text {
            display: inline-block;
            width: 100%;
            white-space: pre-wrap;
        }

        &-add-link,
        &-notes-buttons {
            float: right;
            gap: 10px;
            display: flex;
        }

        &-header-text,
        &-notes-header-left,
        &-notes-editButton {
            float: left;
        }

        &-notes-header-icon,
        &-notes-header-text {
            display: inline-block;
            padding: 4px 8px 4px 0;
        }

        &-notes {
            background: var(
                --container-fills-backgrounds-default-section,
                #fff
            );
            border-radius: 12px;
            padding: 20px 0;
        }

        &-notes-text {
            display: inline-block;
            margin-top: 10px;
        }
    }

    .EditGlyphIcon {
        color: #1d4f72;
    }

    .TrashGlyphIcon {
        color: #8a1a0f;
    }

    &-deleteContractMechanicalDeductions {
        &-ReactModal {
            width: 100%;
        }
    }

    &-nr-contributors-section,
    &-nr-terms-section {
        margin-top: 20px;
    }

    &-nr-contributors-editButton {
        .EditGlyphIcon {
            color: white;
        }
    }

    &-nr-term-name {
        font-size: 18px;
    }

    &-nr-term-scheduleItem {
        font-size: 15px;

        &-dot {
            font-weight: 700;
        }
    }

    &-nr-term-scheduleItem,
    &-nr-contributor-scheduleItem {
        .SuiteBadge {
            background-color: var(--info-200);
            margin-left: 10px;
        }
    }
}

.ContractReactivate,
.DeleteContractSummaryNotes,
.DeleteContractFlowthrough {
    &-Content {
        padding: 5px 0;

        .WarningText {
            font-size: 15px;
            margin-left: 4px;
            vertical-align: bottom;
        }
    }

    .btn-primary {
        background-color: var(--error-650, #b82214) !important;
    }

    .btn-tertiary {
        color: var(--midnight-650, #276b9b) !important;
        border: 1px solid var(--midnight-650, #276b9b) !important;
    }

    .ReactModal-content {
        max-width: 100%;
        width: 100%;
    }

    .ReactModal-body {
        font-size: initial;
    }

    .WarningGlyphIcon {
        color: var(--glyphs-error);
    }
}

.ContractReactivate {
    .btn-primary {
        background-color: var(--error-650, #b82214) !important;
        border-color: var(--error-650, #b82214) !important;
    }

    .ReactModal-content {
        width: 80%;
    }

    .ReactModal-header {
        word-wrap: break-word;
    }
}

.ContractAttachmentsSidecar {
    .ContractAttachmentsSidecarParent {
        width: 100%;
        .ContractAttachmentsSidecarBody {
            .SuiteListBox {
                display: inherit;
            }
            .ContractAttachmentsListBox {
                width: 100%;
                .SuiteListView {
                    max-height: 650px;
                }
            }
            .SuiteListView-option-label {
                font-size: medium;
            }

            .SuiteListView-option-subtitle {
                font-size: small;
            }
        }
    }
}
