.csv-uploader {
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--sd-neutral-200);
    border-radius: 10px;
    flex-direction: column;
    gap: 5px;
}

.csv-uploader.highlight {
    border: 1px solid var(--sd-base-green-400);
}

.csv-modal-header {
    color: var(--sd-neutral-800);
    font-size: 15px;
    line-height: 20px;
    letter-spacing: -0.15px;
    margin-bottom: 2px;
}

.csv-modal-header-container {
    margin-bottom: 8px;
}

.unsupported-file-warning {
    color: var(--sd-error-red-400);
}

.csv-uploader-helper {
    margin-top: 24px;
}

.row.csv-process-rows {
    padding: 16px 10px;
    border-bottom: 1px solid var(--sd-neutral-300);
    margin: 0;
    min-height: 85px;
}

.row.csv-process-rows .col-xs-4.csv-pre-fields {
    padding: 0;
}

.row.csv-process-rows .sd-select:before {
    z-index: 0;
    top: 13px;
}

.big-modal .modal-content {
    max-height: 90vh;
    overflow: auto;
}

.big-modal .modal-dialog {
    width: 90vw;
}

.csv-error-table-wrapper {
    width: 100%;
    overflow: auto;
    max-height: 400px;
    background-color: var(--sd-neutral-200);
    border: 1px solid var(--sd-neutral-200);
    padding: 10px;
    border-radius: 10px;
}

.csv-upload-error-mini-modal.visible {
    opacity: 1;
    visibility: visible;
}

.csv-upload-error-mini-modal {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 40%;
    left: 30%;
    top: 30%;
    transition: opacity 0.3s ease-in-out;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 8px;
    padding: 20px;
    background: var(--modal-background);
    box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
}

.modal-main-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-main-content .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-main-content .header span {
    font-size: 18px;
    font-weight: 500;
}

.modal-main-content .header svg:hover {
    cursor: pointer;
    opacity: 0.85;
}

.modal-main-content .footer button {
    float: right;
}

.csv-sample {
    color: var(--sd-neutral-600);
    font-size: 13px;
    font-weight: 400;
    line-height: 16px; /* 133.333% */
    letter-spacing: -0.24px;
}

.csv-single-sample {
    margin-bottom: 2px;
}

.csv-error-desc-container {
    padding: 0px 24px;
    border: 1px solid var(--sd-neutral-400);
    border-radius: 6px;
    margin: 30px 0;
}

.csv-row-error-container {
    padding: 16px 10px;
    /* border-bottom: 1px solid var(--sd-neutral-300); */
}

.csv-row-error-container:not(:last-child) {
    border-bottom: 1px solid var(--sd-neutral-300);
}

.csv-row-error-index {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 2px;
}

.row.csv-process-rows.header_row {
    min-height: 10px;
    color: var(--sd-neutral-600);
    font-size: 15px;
    font-weight: 500;
    line-height: 15px;
    letter-spacing: 0.12px;
}

.csv-data-process-container {
    margin-top: 16px;
}

.csv-upload-status-detail {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    line-height: 20px;
    padding: 15px 24px;
    border: 1px solid var(--sd-neutral-400);
    border-radius: 6px;
    margin: 30px 0;
}

.csv-upload-info {
    padding: 16px 0;
}

.csv-upload-info:not(:last-child) {
    border-bottom: 1px solid var(--sd-neutral-300);
}

.csv-upload-info>span:first-child {
    color: var(--sd-neutral-800);
}

#csv-corrupted-warning {
    margin-top: 0;
}

.csv-data-warning-container .warning-header-wrapper {
    margin-top: 10px;
    margin-bottom: 20px;
}

#customerErrorTable .fa.fa-warning {
    color: var(--sd-red);
    float: right;
    margin-top: 2px;
}

#customerErrorTable {
    border: 1px solid var(--sd-neutral-300);
    background-color: var(--sd-neutral-100);
}

#customerErrorTable td.error-cell i {
    vertical-align: middle;
}

#customerErrorTable td[contenteditable="true"]:hover {
    box-shadow: 0 0 5px var(--sd-primary-500);
}

#customerErrorTable td[contenteditable="true"]:focus {
    outline: none;
    box-shadow: 0 0 5px var(--sd-primary-500);
}

#customerErrorTable td.error-cell {
    background-color: var(--sd-metric-bg-negative);
}

#customerErrorTable th {
    font-weight: 600;
    white-space: nowrap;
}

#customerErrorTable th,
#customerErrorTable td {
    padding: 10px;
    border: 1px solid var(--sd-neutral-300);
}

.row-number-cell {
    text-align: end;
}

#customerErrorTable td.editable-cell {
    background-color: #FFF9CC !important;
}

#third-party-driver-table .tooltip.top,
#customerErrorTable .tooltip.top {
    margin-bottom: 0 !important;
    transform: translateY(-5px) !important;
}

#third-party-driver-table .tooltip.top .tooltip-arrow,
#customerErrorTable .tooltip.top .tooltip-arrow {
    bottom: -44px !important; /* Position the arrow further down */
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border: none !important;
    position: relative !important;
    border-width: 10px 10px 0 !important; /* Larger triangle */
    border-color: #fff transparent transparent transparent !important;
}

#third-party-driver-table .tooltip.top .tooltip-arrow:before,
#customerErrorTable .tooltip.top .tooltip-arrow:before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    bottom: 0 !important;
    left: 50% !important;
    margin-left: -10px !important;
    border-style: solid !important;
    border-width: 10px 10px 0 !important;
    border-color: #ccc transparent transparent transparent !important;
}

#third-party-driver-table .tooltip.top .tooltip-arrow:after,
#customerErrorTable .tooltip.top .tooltip-arrow:after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    bottom: 1px !important;
    left: 50% !important;
    margin-left: -9px !important;
    border-style: solid !important;
    border-width: 9px 9px 0 !important;
    border-color: #fff transparent transparent transparent !important;
}

/* Make sure the tooltip inner has correct styling */
#third-party-driver-table .tooltip-inner {
    max-width: 400px; /* Adjust as needed */
    white-space: normal; /* Allows text wrapping */
    word-wrap: break-word;
}

#third-party-driver-table .tooltip-inner,
#customerErrorTable .tooltip-inner {
    background-color: #fff !important;
    color: #000 !important;
    border: 1px solid #ccc;
    padding: 8px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Ensure the tooltip has correct z-index and opacity */
#third-party-driver-table .tooltip.in,
#customerErrorTable .tooltip.in {
    opacity: 1 !important;
    filter: alpha(opacity=100) !important;
}

.tooltip, .tooltip-inner, .tooltip-arrow {
    box-sizing: border-box;
}
