#api-results-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin: 10px 0;
    font-family: Arial, sans-serif;
    color: #212529;
}

#api-results-table th, # api-results-table td {
    text-align: left;
    padding: 8px;
    border: 1px solid #ddd; /* Light border for modern look */
}

#api-results-table th {
    background-color: #f4f4f4; /* Light gray for header */
    font-weight: bold;
}

#api-results-table tr:nth-child(even) {
    background-color: #f9f9f9; /* Alternating row colors */
}

#api-results-table tr:hover {
    background-color: #f1f1f1; /* Highlight on hover */
}

/* Ensure headers stay visible */
#attrTable th {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #343a40;
    font-size: 0.85rem;
    color: white;
    text-align: center;
    padding: 10px;
    border-bottom: 2px solid #dee2e6;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); /* Adds a slight shadow */
}

#attrTable td {
    font-size: 13px;
}

#attrModal-page-size {
    text-align: center; /* Centers text horizontally */
    vertical-align: middle;
    line-height: normal;
    padding: 5px 10px; /* Adjust for better vertical centering */
    height: 30px; /* Ensure uniform height */
}

/* General Modal Styling */
.modal-xxl {
    max-width: calc(100% - 150px);
    width: 100%;
}

.modal-body {
    overflow: visible;
    padding: 20px;
    font-size: 14px;
    z-index: 1;
}

.modal-content {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: visible !important; /* Ensures dropdowns extend */
}

.modal-dialog {
    max-height: 95vh;
    margin: 0 auto;
    overflow: visible !important;
}

/* Unified Header & Footer Styling */
.modal-header, .modal-footer {
    border: none;
}

.modal-footer {
    flex-shrink: 0; /* Ensure the footer doesn't shrink or disappear */
}

.modal-title2 {
    font-size: 1rem;
    margin: 4px 2px;
}

/* Fullwidth Modal */
.modal-fullwidth .modal-dialog {
    width: calc(100% - 100px); /* Leaves 50px margin on both sides */
    max-width: 1200px;
    max-height: 90vh;

    display: flex;
    align-items: center;
    justify-content: center;

    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    margin: auto;
}

.modal-fullwidth .modal-content {
    max-height: 90vh;
    overflow: hidden;
    background-color: #eaeaea !important;
    border-radius: 10px;
}

/* Allow modal body to scroll independently */
.modal-fullwidth .modal-body {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 70vh;
}

/* Common Modal Header Styles */
.modal-fullwidth .modal-header,
.modal-custom-header .modal-header {
    background: linear-gradient(135deg, #1a1a1a, #333);
    color: #f8f9fa;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #444;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

/* Unified Modal Header Title */
.modal-fullwidth .modal-header h5,
.modal-custom-header .modal-header h5 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* Execution & Change Request References */
.modal-fullwidth .modal-header .executionReference,
.modal-custom-header .modal-header .changeRequestReference {
    font-size: 0.875rem;
    font-weight: 400;
    color: #b0b0b0; /* Softer text color */
}

/* Modern Close Button */
.modal-fullwidth .modal-header .close,
.modal-custom-header .modal-header .close {
    background: none;
    border: none;
    color: #bbb;
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.modal-fullwidth .modal-header .close:hover,
.modal-custom-header .modal-header .close:hover {
    color: #fff;
    transform: scale(1.1);
}

.color-picker-modal-width {
  max-width: 600px;
}

.cr-approval-status-table {
    width: 100%;
    margin-right: 0;
}

.cr-approval-step {
    display: inline-block; /* Ensures box behavior */
    min-width: 150px; /* Ensures uniform width */
    border-width: 1px;
    border-style: solid;
    border-color: black;
    text-align: center; /* Centers text */
    white-space: nowrap; /* Prevents text from wrapping */
}

/* Wrapper to enable horizontal scrolling */
.cr-approval-step-container {
    width: 100%;  /* Ensures it takes full width */
    overflow-x: auto;  /* Enables horizontal scrolling */
    white-space: nowrap; /* Prevents line breaks */
    padding-bottom: 5px; /* Prevents scrollbar overlap */
}

/* Greyed-out steps (not applicable) */
.cr-approval-step-not-applicable {
    background-color: #d6d6d6 !important; /* Light grey */
    color: #a0a0a0 !important; /* Dark grey text */
    border-color: #b0b0b0 !important;
    opacity: 0.6; /* Slightly faded */
}

.cr-current-approval-step {
    font-size: 0.875rem;
    background-color: #333;
    color: #fff;
    cursor: pointer;
}

.cr-current-approval-step:hover {
    background-color: #555;
}

.cr-item-label {
    font-size: 14px;
    cursor: pointer;
}

.cr-item-label:hover {
    color: #007bff;
}

.cr-modal-table th {
    background-color: #343a40; /* Dark gray background */
    color: white; /* White text */
    font-size: 0.875rem;
    text-align: left;
    padding: 10px;
}

/* Apply black left border to the first column of the header */
.cr-modal-table-left-border {
    border-left: 1px solid #333 !important;
}

/* Apply black right border to the last column of the header */
.cr-modal-table-right-border {
    border-right: 1x solid #333 !important;
}

.cr-modal-table td {
    color: 000;
    font-size: 0.875rem;
    text-align: left;
    padding: 10px;
}

.cr-modal-text {
    font-size: 0.875rem;
    color: #495057;
}

.cr-modal-text[readonly] {
    background-color: #fff !important;
    color: #333 !important; /* Light text for contrast */
}

.cr-modal-textarea {
    font-size: 0.875rem;
    color: #495057;
}

.cr-modal-textarea[readonly] {
    background-color: #fff !important;
    color: #333 !important; /* Light text for contrast */
    min-height: 50px; /* Ensure visibility */
    max-height: 200px; /* Limit height before scrolling */
    overflow-y: auto !important; /* Enable vertical scrolling */
    white-space: normal !important; /* Prevent breaking scrolling */
    word-break: break-word; /* Ensure long words don't break layout */
}

/* Step container inside the scrolling wrapper */
.cr-scrollable-steps {
    display: inline-flex; /* Keeps steps in a row */
    gap: 10px; /* Adds space between steps */
    min-width: fit-content; /* Ensures steps do not shrink */
}
