* {
    box-sizing: border-box;
}

.timeline {
    position: relative;
    max-width: 100%;
    margin: 24px auto;
    padding: 0 20px;
}

.timeline-empty::after {
    display: none;
}
.timeline::before {
    bottom: var(--timeline-bottom, 0px);
}

.right-node {
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.content-date-right-history {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* fixes a bug with datepicker month input being bigger than the day */
.timelineMenu div.pf-v5-c-calendar-month__header-year span.pf-v5-c-form-control input {
    margin-bottom: -3px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 1px;
    background-color: #6a6e73;
    top: 30px;

    /* This offset is needed to keep it responsive */
    --timeline-bottom-offset: -30px;

    /* This value is calculated in timeline.tsx */
    bottom: calc(var(--timeline-bottom) + var(--timeline-bottom-offset, 18.35%));
    left: calc(20% + 14.5px);
    transform: translateX(-50%);
}

.timeline-loading-spinner {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: white;
    border: 4px solid #ff9f55;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    margin-bottom: 24px;
}

.timeline-pagination {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

#options-menu-top-pagination {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    margin-left: 1rem;
}

.timeline-sort-order-select {
    width: auto;
    margin-left: 1rem;
}

.timeline-sort-order-select .pf-v6-c-menu-toggle {
    min-width: 17rem;
}

.timeline-controls:last-of-type {
    justify-content: flex-start;
}

.timeline-controls:last-of-type .timeline-pagination {
    flex-grow: 0;
}

.timeline-node {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-bottom: 32px;
    min-height: 67px;
    max-height: 1em;
}

.timeline-avatar {
    position: absolute;
    left: calc(20% + 2.5px);
    transform: translateX(-50%);
    top: 12px;
    z-index: 5;
}

.timeline-marker {
    position: absolute;
    background-color: #ff9f55;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    z-index: 2;
    left: calc(20% + 2.5px);
    transform: translateX(-50%);
    top: 25px;
}

.left-node {
    flex: 0 0 20%;
    max-width: 25%;
    padding-right: 24px;
    margin-left: -2em;
    margin-right: 24px;
}

.content-date-left-history {
    font-family: 'Red Hat Display';
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    text-align: right;
}

.content-time-left-history {
    font-feature-settings: 'clig' off, 'liga' off;
    font-family: 'Red Hat Text';
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    text-align: right;
    line-height: 30px;
    white-space: nowrap;
}

.content-date-right-history {
    color: #151515;
    font-feature-settings: 'clig' off, 'liga' off;
    font-family: 'Red Hat Display';
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 24px;
}

.content-time-right-history {
    color: var(--Text-and-links-pf-global--Color--100, #151515);
    font-feature-settings: 'clig' off, 'liga' off;
    font-family: 'Red Hat Text';
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 21px;
}

.right-node {
    flex-grow: 1;
    padding-left: 2.8%;
    margin-left: 1%;
}

.right-node::before {
    content: ' ';
    position: absolute;
    top: 22.5px;
    width: 0;
    height: 0;
    border: medium solid white;
    border-width: 7px 7px 7px 0;
    border-color: transparent white transparent transparent;
    transform: translateX(-100%);
}

.internal.right-node::before {
    border-right-color: #ee0000;
}

.customer.right-node::before {
    border-right-color: #316dc1;
}

.timeline-internal {
    background-color: #ee0000;
}

.timeline-customer {
    background-color: #316dc1;
}

.timeline-avatar.timeline-avatar-internal {
    --pf-v6-c-avatar--BorderColor: #ee0000;
    --pf-v6-c-avatar--BorderWidth: 2px;
}

.timeline-avatar.timeline-avatar-customer {
    --pf-v6-c-avatar--BorderColor: #316dc1;
    --pf-v6-c-avatar--BorderWidth: 2px;
}

.contentTimeline {
    padding: 16px;
    /* position: absolute; */
    border-radius: 3px;
    /* margin-bottom: 32px; */
}

.content-right-history {
    background-color: white;
    border-left-width: 3px !important;
    border-left-style: solid !important;
    border-radius: 3px;
    border: 1px solid #d2d2d2;
    width: 100%;
}

.content-right-customer {
    border-left-color: #316dc1 !important;
}

.content-right-internal {
    border-left-color: #ee0000 !important;
}

ul#case-history-paginated-timeline {
    list-style-type: none !important;
    /* this is to deal with firefox they add in a ::marker and it is visible */
}

.case-history-timeline-search {
    width: 40%;
}

.timelineMenu {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.case-history-timeline-datepicker {
    display: flex;
    /* position: absolute; */
    justify-content: flex-end;
    width: 64.2%;
}

.case-history-timeline-datepicker input[aria-label='Date picker'] {
    padding-right: 0 !important;
}

.case-history-timeline-datepicker button {
    height: 100% !important;
}

.case-history-timeline-datepicker .pf-v6-c-calendar-month__header-year input {
    font-size: var(--pf-t--global--font--size--body--default);
    line-height: var(--pf-t--global--font--line-height--body);
}

.empty-state-date-picker {
    margin-left: 82%;
}

/* Ensure button maintains fixed size */
.case-history-timeline-datepicker button {
    flex: 0 0 auto;
    height: 36px;
}

/* Error state is shown in helper text below; hide the inline status icon from the input */
.case-history-timeline-datepicker .pf-v6-c-form-control__icon.pf-m-status {
    display: none;
}

.timeline-sort-order-select {
    display: flex;
    justify-content: center;
}

.order-select .pf-v6-c-menu-toggle {
    min-width: 15rem;
}

@-moz-document url-prefix() {
    .timeline-controls {
        padding: 0.5rem 1rem;
    }

    #options-menu-top-pagination {
        width: 15em;
    }
}

@media screen and (max-width: 850px) {
    .contentTimeline {
        padding: 16px 8px;
    }

    .content-date-left-history {
        font-size: 15px;
    }

    .content-time-left-history {
        font-size: 13px;
    }

    .content-date-right-history {
        font-size: 14px;
    }
}
