/* 图标样式兼容处理 */
[class^="ri-"], [class*=" ri-"] {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* 添加动画效果 */
.fa-spin {
    animation: fa-spin 2s infinite linear;
}
@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 页面布局样式 */
.page-container {
    min-width: 1024px;
    overflow-x: auto;
}
.main-content {
    margin-left: 18rem; /* 与左侧导航栏宽度一致 */
    width: calc(100% - 18rem);
    min-width: 768px;
}
/* 添加输入框和选择框的边框样式 */
.is-achieved-select,
.technical-measures,
input[name="score"] {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem;
}
.is-achieved-select:focus,
.technical-measures:focus,
input[name="score"]:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}
/* 提高级技术措施列样式 */
.technical-measures-cell {
    width: 300px;
    min-width: 300px;
    max-width: 500px;
}
.technical-measures {
    width: 100%;
    min-height: 100px;
    resize: vertical;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 省市选择器加载平滑过渡 */
.province-city-container select {
    min-width: 100px; /* 确保最小宽度 */
    transition: all 0.2s ease; /* 平滑过渡效果 */
    height: 42px; /* 固定高度 */
}

/* 分类过滤器按钮样式 */
.category-filter {
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-filter.active {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
    font-weight: 600;
    transform: translateY(-1px);
}

/* 添加悬浮徽章样式 */
.floating-badge {
    position: fixed;
    right: 20px;
    top: 80px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 12px;
    z-index: 50;
    width: auto;
    min-width: 160px;
    max-width: 200px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-badge:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.badge-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
}

.category-badges {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-badge {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: white;
    transition: all 0.2s ease;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.category-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.category-badge:hover::before {
    opacity: 1;
}

.category-badge.not-achieved {
    background-color: #f87171;
}

.category-badge.achieved {
    background-color: #34d399;
}

.category-badge.active {
    outline: 2px solid #4f46e5;
    outline-offset: 1px;
}

.badge-content {
    max-height: 500px;
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge-content.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.toggle-badge {
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.toggle-badge:hover {
    background-color: #f3f4f6;
}

.toggle-badge i {
    transition: transform 0.3s ease;
    font-size: 0.85rem;
}

/* 响应式样式 */
@media (min-width: 1280px) {
    .floating-badge {
        min-width: 180px;
        max-width: 220px;
        padding: 16px;
    }

    .badge-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .category-badges {
        gap: 8px;
    }

    .category-badge {
        padding: 8px 12px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .toggle-badge {
        padding: 6px;
    }

    .toggle-badge i {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .floating-badge {
        right: 10px;
        top: 70px;
        min-width: 140px;
        padding: 10px;
    }
    
    .category-badge {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
}

/* 详情表格样式 */
.detail-table {
    table-layout: fixed !important;
    width: 100% !important;
}
.detail-table td {
    width: 16.66% !important;
}
.detail-table input,
.detail-table select {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 添加fadeIn动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 悬浮保存按钮样式 */
#floatingSaveBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    transition: all 0.3s ease;
    z-index: 1000;
}

#floatingSaveBtn:hover {
    transform: scale(1.1);
}

#floatingSaveBtn button {
    width: 70px;
    height: 70px;
    background-color: #3b82f6; /* Primary color */
    color: white;
    border-radius: 50%;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

#floatingSaveBtn button:hover {
    background-color: #2563eb; /* Darker shade on hover */
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}

#floatingSaveBtn button:active {
    transform: scale(0.95);
}

