﻿@import "components/modals.css";
@import "components/buttons.css";
@import "components/forms.css";
@import "components/tables.css";
@import "layouts/sidebar.css";
@import "components/charts.css";

/*设置默认字体*/
body {
    font-size: 16px;
    background: #f8f9fa; /* 浅灰背景 */
}

/*-----------------顶部导航栏-----------------*/
.navbar-header {
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 15px;
}

.navbar-brand img.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.top {
    font-size: 20px;
    font-weight: bold;
}

.top:hover { /*悬停状态（不生效）*/
    background-color: pink;
}

nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

/*副标题*/
.free {
    font-size: 20px;
    font-weight: bold;
    padding: 15px;
}

.w1 {
    position: relative;
}

.subNav {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    list-style-type: none;
    background-color: white;
    border: 1px solid #4e6ef2;
    margin: 0;
    padding: 0;
    /*display: none;*/
    /*min-width: 150px;*/
    width: max-content; /* 宽度由最宽的子项内容决定 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    /* 动画相关 */
    visibility: hidden; /* 隐藏但占位（绝对定位不占位，这里只是让元素不可见且不可交互） */
    opacity: 0;
    transform: translateY(-10px);
    transition: visibility 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

/* 关键：使用 hover 显示子菜单 */
.w1:hover .subNav {
    /*display: block;*/
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.subNav a:link {
    color: #777;
}

.subNav a:visited {
    color: #777;
}

.subNav a:hover {
    color: #c7254e;
}

#bs-example-navbar-collapse-1 > .navbar-man > li.active > a {
    background-color: pink;
}

#bs-example-navbar-collapse-1 > .navbar-right > li.active a {
    background-color: lavender;
}

/*---------------------------分页器设置----------------------------*/
.pagination {
    list-style-type: none; /* 去除默认的列表样式*/
    margin: 0;
    padding: 0;
    position: fixed;
    bottom: 0;
    left: 0;
}

.pagination li {
    float: left; /*将列表项浮动到左侧*/
    margin-right: 10px; /*设置列表项之间的间距*/
}

/*表格底部的文字*/
.radish {
    display: flex;
    font-size: 18px;
}

/*-------------------------颜色类--------------------------------*/
.red {
    color: red;
}

.green {
    color: green;
}

.orange {
    color: orange;
}

.blue {
    color: blue;
}

/*------------------------------------------------------*/
/*消息闪现*/
.flashes {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999; /* 调整此值以确保它出现在其他元素之上 */
    pointer-events: none; /* 关键：容器本身不拦截事件 */
}

.flashes li {
    margin: 0 10px; /* 在消息之间添加一些间距 */
    padding: 10px;
    border-radius: 5px;
    color: #fff;
    list-style-type: none;
    /* 添加动画效果 */
    animation: fadeInOut 5s ease-in-out forwards;
    cursor: pointer;
    transition: opacity 0.3s ease;
    pointer-events: auto; /* 关键：只有消息本身可点击 */
}

/* 定义动画 */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none; /* 开始时不能点击 */
    }
    15% {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto; /* 显示期间可以点击 */
    }
    85% {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none; /* 结束时不能点击 */
        visibility: hidden; /* 关键：确保元素不占用空间 */
    }
}

/* 鼠标悬停时暂停动画 */
.flashes li:hover {
    animation-play-state: paused;
}

/*----------------------------背景色--------------------------------*/
.info {
    background-color: #1e90ff;
}

.success {
    background-color: #228b22;
}

.warning {
    background-color: #ff8c00;
}

.error {
    background-color: #b22222;
}

.pink {
    background-color: pink;
}

/* 为所有a标签统一移除：鼠标点击时的瞬时框 + 点击后的焦点框 */
a:active, a:focus {
    outline: none;
}

/* 针对Chrome新版更精准的焦点策略 */
a:focus-visible {
    outline: none;
}
