#contract-page .showfile-contract-info div:nth-child(1) {
    background-color: var(--Gray-Gray-400);
}

.dark-page #contract-page .showfile-contract-info div:nth-child(1) {
    background-color: var(--Gray-Gray-500);
}

#contract-page .showfile-contract-info div:nth-child(1) p {
    color: var(--Gray-Not-White);
}

#contract-page .showfile-contract {
    background-color: var(--Primary-Blue-50);
    border: 1px solid var(--Primary-Blue-100);
    border-radius: 8px;
}

.dark-page #contract-page .showfile-contract {
    background-color: var(--Primary-Blue-100);
    border: 1px solid var(--Primary-Blue-200);
    border-radius: 8px;
}

#contract-page .showfile-contract-btns button {
    border: 2px solid var(--Primary-Blue-500);
    color: var(--Primary-Blue-500);
}

.dark-page #contract-page .showfile-contract-btns button {
    border: 2px solid var(--Primary-Blue-400);
    color: var(--Primary-Blue-400);
}

/* tabs */


.dark-page #contract-filter .tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 8px 7px;
    transition: 0.3s;
    font-weight: 400;
    color: var(--Gray-Gray-400);
}

#contract-filter .tab button:hover {
    color: var(--Gray-Gray-850);
}

.dark-page #contract-filter .tab button:hover {
    color: var(--Gray-Gray-300);
}

#contract-filter .tab button.active {
    color: var(--Gray-Not-Black);
    font-weight: 600;
}

.dark-page #contract-filter .tab button.active {
    color: var(--Gray-Not-White);
    font-weight: 600;
}

#contract-filter .tab button.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--Primary-Blue-500);
}


#contract-filter .card-main h6:before {
    content: "";
    position: absolute;
    top: -4px;
    left: -9px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    z-index: -1;
    background-color: var(--Secondary-Yellow-400);
}

.dark-page #contract-filter .card-main h6::before {
    content: "";
    position: absolute;
    top: -4px;
    left: -9px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    z-index: 1;
    background-color: var(--Secondary-Yellow-100);
}



table {
    width: 100%;
    table-layout: fixed; /* allows controlling column widths */
    background-color: transparent;
    border-collapse: collapse;
}

th, td {
    padding: 8px;
    vertical-align: top;
    border-bottom: 1px solid #ccc; /* colored line between rows */
}

/* The Breakdown column takes 50% width */
th.breakdown-cell, td.breakdown-cell {
    width: 40%;
}

#clauseTableBody {
    font-size: 11px;
    font-family: 'Nunito';
}

#thClauseTable {
    font-size: 14px;
    font-family: 'Nunito';
}

/* Force all breakdown text areas to display the same size */
.breakdown-text {
    display: block;
    min-height: 3.5em; /* ensures a consistent height even with less text */
    max-height: 7.5em; /* about 3 lines assuming line-height: 1.5 */
    line-height: 1.5;
    overflow-y: auto;
}

.timeline-text {
    display: flex;
    position: relative;
    gap: 5px;
    justify-content: flex-start;
    align-items: center;
}

.icon-container {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    padding: 5px;
    z-index: 1;
}

.scrollable-content {
    flex: 1 1 auto;
    max-height: 100px;
    overflow-y: auto;
    padding: 5px;
    min-height: 3.5em;
    max-height: 4.5em;
    line-height: 1.5;
    overflow-y: auto;
}

.show-more-container {
    position: relative;
    width: 100%;
    height: 50px;
    margin-top: -24px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(204, 204, 206, 0.6) 47%, rgb(203, 203, 203));
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.dark-page .show-more-container {
    position: relative;
    width: 100%;
    height: 50px;
    margin-top: -24px;
    background: linear-gradient(to bottom, rgba(55, 60, 87, 0), rgba(55, 60, 87, 0.8) 33%, rgba(55, 60, 87, 1));
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.show-more-btn {
    background: none;
    border: none;
    font-weight: bolder !important;
    color: var(--Primary-Blue-500);
    padding: 5px 0;
    font-size: 18px;
    cursor: pointer !important;
    width: 100%;
    text-align: center;
}

.d-none {
    display: none;
}

.svg-badge-wrapper {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
}

.svg-icon svg {
    width: 24px;
    height: 24px;
}

.svg-badge {
    position: absolute;
    top: -3px;
    right: 12px;
    background: #E965077A;
    color: #000;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    min-width: 16px;
    text-align: center;
}


.upload-box {
    border-radius: 12px;
    padding: 20px;
    position: relative;
    text-align: center;
    width: 70%;
}

.upload-title {
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.progress-bar-container {
    background-color: #6b6b6b;
    border-radius: 5px;
    height: 8px;
    width: 30%;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background-color: #ffc000;
    width: 30%;
    position: absolute;
    left: -30%;
    animation: loading 1.2s infinite ease-in-out;
}

@keyframes loading {
    0% {
        left: -30%;
    }
    50% {
        left: 50%;
    }
    100% {
        left: 100%;
    }
}

/* Waiting indicator for assessment rows */
.assessment-waiting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--Primary-500);
    font-size: 14px;
    font-weight: 500;
}

.assessment-waiting::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--Primary-500);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    -webkit-animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Processing indicator styles */
.processing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.processing-indicator::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #FFC000;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    -webkit-animation: spin 1s linear infinite;
}

/* Search UX improvements */
#search-icon.spinning {
    animation: spin 1s linear infinite;
    -webkit-animation: spin 1s linear infinite;
}

#search-status {
    display: block; /* reserve space to avoid layout shift */
    font-size: 12px;
    color: var(--Primary-Blue-500);
    margin-top: 6px;
    min-height: 16px; /* consistent height */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s linear;
}

#search-status.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.highlight-pulse {
    box-shadow: 0 0 0 2px rgba(43, 171, 51, 0.25) inset;
    animation: pulse 1.2s ease-out 2;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(43, 171, 51, 0) inset;
    }
    30% {
        box-shadow: 0 0 0 3px rgba(43, 171, 51, 0.5) inset;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(43, 171, 51, 0) inset;
    }
}
