@import './variables.module.less';

@primary-color: #2152d1;
@success-color: #52C41A;
@warning-color: #FAAD14;
@error-color: #FF4D4F;
@border-color: #DCDFE6;
@background-color: #F7F8FA;
@font-size-base: 14px;
@border-radius-base: 4px;
@border-radius-large: 12px;

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

#root {
    height: 100%;
    width: 100%;
    font-size: @font-size-base;
    color: @theme-text-color !important;
    // Ant-Design主题-属性
    --primary-color: @primary-color;
    --text-color: @theme-text-color;
    --border-radius: @border-radius-base;
}

p {
    margin: 0;
}

a,
a:hover,
a:active {
    cursor: pointer;
    font-size: @font-size-base;
    color: @primary-color;
    text-decoration: none;
}

ul {
    margin: 0;
    padding: 0;
}

ul li {
    list-style-type: none;
}

.text-primary,
.text-primary:hover {
    color: @primary-color;
}

.text-success,
.text-success:hover {
    color: @success-color;
}

.text-warning,
.text-warning:hover {
    color: @warning-color;
}

.text-error,
.text-error:hover {
    color: @error-color;
}

.router-lazyLoad {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Header 样式变量化入口（供 header.less 覆盖） */
.header {
    background: @header-bg !important;
    .header-gj-text{
        color: @header-text-color !important;
    }
    .ant-tabs .ant-tabs-tab {
        color: @header-text-color !important;
    }
}

// Ant-Design主题
.ant-menu-inline {
    border: none !important;
}

.ant-menu-inline-collapsed {
    border: none !important;
}

// 禁用
//.ant-form-item {
//    margin-bottom: 16px !important;
//}
.markdown-preview img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

// 全局按钮样式
.ant-btn-primary {
    background: #1890ff;
    border: 1px solid #1890ff;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

    &:hover {
        background: #40a9ff;
        border-color: #40a9ff;
        color: #ffffff;
        // box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        // transform: translateY(-1px);
    }

    &:active {
        background: #096dd9;
        border-color: #096dd9;
        color: #ffffff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        transform: translateY(0);
    }

    &:focus {
        background: #1890ff;
        border-color: #1890ff;
        color: #ffffff;
        box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    }

    &:disabled {
        background: #f5f5f5;
        border-color: #d9d9d9;
        color: rgba(0, 0, 0, 0.25);
        box-shadow: none;
        transform: none;
    }
}

/* 覆盖 markdown 渲染出来的样式 */
.ant-typography h1 {
    font-size: 20px;
    /* 调整大小 */
    color: #333;
    /* 字体颜色 */
    //   border-bottom: 2px solid #eee; /* 底部加一条分隔线 */
    margin: 2px 0;
}

.ant-typography h2 {
    font-size: 18px;
    color: #333;
    margin: 2px 0;
    //   border-left: 4px solid #4caf50; /* 左边加一条绿色竖线 */
}

.ant-typography h3 {
    font-size: 16px;
    color: #333;
    margin: 2px 0;
    //   border-left: 4px solid #4caf50; /* 左边加一条绿色竖线 */
}
.markdown-preview h1 {
    font-size: 20px;
    /* 调整大小 */
    color: #333;
    /* 字体颜色 */
    //   border-bottom: 2px solid #eee; /* 底部加一条分隔线 */
    margin: 2px 0;
}

.markdown-preview h2 {
    font-size: 18px;
    color: #333;
    margin: 2px 0;
    //   border-left: 4px solid #4caf50; /* 左边加一条绿色竖线 */
}

.markdown-preview h3 {
    font-size: 16px;
    color: #333;
    margin: 2px 0;
    //   border-left: 4px solid #4caf50; /* 左边加一条绿色竖线 */
}
.markdown-preview h4 {
    font-size: 14px;
    color: #333;
    margin: 2px 0;
    //   border-left: 4px solid #4caf50; /* 左边加一条绿色竖线 */
}
.markdown-preview h5,h6 {
    font-size: 12px;
    color: #333;
    margin: 2px 0;
    //   border-left: 4px solid #4caf50; /* 左边加一条绿色竖线 */
}