
@import "./animations.css";
@import "./editor-theme.css";
@import "./code-editor-styles.css";
@import "./human-evals.css";
@import "./loading.css";

@layer tailwind-base, antd;


/* === Custom styles for Ant Design Segmented Control === */
.evaluation-filters .ant-segmented-item-selected {
    background: #1677ff !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.08);
}

.evaluation-filters .ant-segmented-item {
    background: white;
    color: #2a2a2a;
    font-weight: 400;
}

@layer tailwind-base {
    @tailwind base;
}
@tailwind components;
@tailwind utilities;


html,
body {
    padding: 0;
    margin: 0;
    text-decoration: none;
}

.dark-mode {
    background-color: #141414;
}

.light-mode {
    background-color: #ffffff;
    color: #000;

    .next-error-h1 {
        border-right: 1px solid #000;
    }
}

.evaluationContainer {
    &:not(.human-eval) {
        margin-bottom: 200px;
    }
}

.mdxSlider img {
    width: 100%;
}

.testset-column {
    cursor: pointer;
}

.testset-column a {
    color: inherit;
}

.editor-input > p {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}


.hover-button-wrapper {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ant-table-row:hover .hover-button-wrapper {
    opacity: 1;
}

.ant-tooltip-inner {
    max-height: 300px;
    overflow-y: auto;
}

@media screen and (max-width: 1572px) {
    .evalaution-title {
        min-height: 80px;
    }
}

@media screen and (max-width: 1024px) {
    .evalaution-title {
        min-height: 100px;
    }
}

@media screen and (max-width: 848px) {
    .evalaution-title {
        min-height: 120px;
    }
}

/* It removes antd tabs transition to fix lag when using type="editable-card" */
.editable-card.ant-tabs-card > .ant-tabs-nav .ant-tabs-tab {
    transition: none;
}

/* It aligns the settings icon in the table column  */
.ant-table-cell-fix-right-first svg {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.agenta-rich-text-editor {
    &.disabled {
        cursor: not-allowed;
    }
    .editor-skeleton {
        li {
            margin-block-start: 0.2em !important;
            height: 1.33em !important;
            font-size: 13px;
        }
    }

    /* Code action menu */
    .code-action-menu {
        position: absolute;
        z-index: 100;
        top: -10px;
        right: 8px;
        opacity: 0;
        background: white;
        padding: 4px;
        border-radius: 4px;
        box-shadow: 0 12px 28px 0 rgba(0, 0, 0, 0.2);
        transition: opacity 0.1s ease;
        height: 32px;
    }

    .code-action-menu:hover {
        opacity: 1;
    }
}

.agenta-editor-wrapper {
    interpolate-size: allow-keywords;
    transition: height 0.3s ease-in-out;
    &:focus-within {
        height: fit-content !important;
    }
}

.editor-inner:not(.code-editor) {
    .editor-code {
        background-color: rgb(240, 242, 245);
        font-family: Menlo, Consolas, Monaco, monospace;
        display: block;
        padding: 8px;
        line-height: 1.53;
        font-size: 13px;
        margin: 0;
        margin-top: 8px;
        margin-bottom: 8px;
        overflow-x: auto;
        position: relative;
        tab-size: 2;
    }

    > .editor-input.markdown-view > .editor-code {
        background-color: transparent;
    }
    > .editor-input:not(.markdown-view) > .editor-code {
        &:after {
            content: attr(data-highlight-language);
            top: 0;
            right: 3px;
            padding: 3px;
            font-size: 10px;
            text-transform: uppercase;
            position: absolute;
            color: rgba(0, 0, 0, 0.5);
          }
    }
}

/** Align the input search with the search box **/
.ant-input-group-wrapper {
    .ant-input {
        padding-top: 3.1px !important;
        padding-bottom: 3.1px !important;
    }
}

/* Comparison table styling fixes */
.comparison-table .ant-table-expanded-row-fixed::after {
    border-right: none !important;
}

.comparison-table .ant-table-tbody > tr.ant-table-expanded-row > td {
    padding: 0 !important;
    border-bottom: none !important;
}

.comparison-table .ant-table-tbody > tr.ant-table-expanded-row .ant-table-tbody > tr > td {
    border-bottom: 1px solid #f0f0f0 !important;
}

.comparison-table .ant-table-tbody > tr.ant-table-expanded-row .ant-table {
    margin: 0 !important;
}

.comparison-table .ant-table-tbody > tr.ant-table-expanded-row .ant-table-tbody > tr:last-child > td {
    border-bottom: none !important;
}

/* Styling for comparison rows (children) - light background for differentiation */
.comparison-table .ant-table-tbody > tr[data-row-key*="-comp-"] {
    background-color: #fafafa !important;
}

.comparison-table .ant-table-tbody > tr[data-row-key*="-comp-"]:hover {
    background-color: #f0f0f0 !important;
}

/* Ensure child rows have subtle visual distinction */
.comparison-table .ant-table-tbody > tr[data-row-key*="-comp-"] > td {
    background-color: inherit !important;
    border-left: 3px solid #e6f4ff !important;
    padding-left: 12px !important;
}

.comparison-table {
    .ant-table-row.comparison .ant-table-cell {
        background-color: #ffdfdf;
    }
    .ant-table-cell:has(.ant-table-expanded-row-fixed) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .ant-table-expanded-row-fixed {
        margin: 0 !important;
    }
    
    /* Fix expand button positioning and overflow */
    .ant-table-row-expand-icon-cell {
        width: 120px !important;
        min-width: 120px !important;
        padding: 8px !important;
        text-align: center !important;
    }
    
    /* Ensure first data column doesn't contain expand icon */
    .ant-table-tbody > tr > td:first-child:not(.ant-table-row-expand-icon-cell) {
        padding-left: 12px !important;
    }
    
    /* Style the expand icon container */
    .ant-table-row-expand-icon {
        display: inline-block !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
    }
    .ant-table-expanded-row-fixed {
        padding-left: 0 !important;
        thead {
            display: none
        }
    }
}