/* 自定义样式 - 增加页面两侧空间 */

/* 联系我们模块按钮样式调整 */
#contact-us-section select.form-select,
#contact-us-section .btn {
    height: 30px; /* 减少按钮高度50%（默认通常是38px左右） */
    padding: 0.25rem 0.75rem; /* 调整内边距 */
    font-size: 0.875rem; /* 稍小的字体 */
    display: flex;
    align-items: center;
    justify-content: center;
}

#contact-us-section .btn i {
    font-size: 0.75rem; /* 稍小的图标 */
    margin-right: 0.25rem; /* 调整图标和文字间距 */
}

/* 主要内容容器 - 增加左右内边距 */

/* 徽章样式 - 确保状态标签正确显示 */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background-color: #6c757d;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-success {
    background-color: #198754;
}

.badge-secondary {
    background-color: #6c757d;
}

/* 分页信息样式 - 确保文本颜色可见 */
.pagination-info {
    color: #1f2937 !important;
}
.container.wider-margins {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

/* 在大屏幕上增加更多内边距 */
@media (min-width: 768px) {
    .container.wider-margins {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}

/* 在超大屏幕上进一步增加内边距 */
@media (min-width: 1280px) {
    .container.wider-margins {
        padding-left: 4rem !important;
        padding-right: 4rem !important;
    }
}

/* 去掉行业动态模块模态框外部的滚轮 */
#industryInfoTypeModal .modal-content {
    overflow: hidden !important;
}

#industryInfoTypeModal .modal-body {
    overflow: hidden !important;
}

#industryInfoTypeModal .grid-container {
    height: calc(100vh - 200px) !important; /* 调整高度以适应不同屏幕 */
    max-height: 700px; /* 设置最大高度 */
}

#industryInfoTypeModal .overflow-y-auto {
    overflow-y: auto !important; /* 只保留内部内容区域的滚动条 */
}

/* 确保模态框不会出现外部滚动条 */
#industryInfoTypeModal.show {
    overflow: hidden !important;
}

/* 去掉最美保安员模块模态框外部的滚轮 */
#securityGuardTypeModal .modal-content {
    overflow: hidden !important;
}

#securityGuardTypeModal .modal-body {
    overflow: hidden !important;
}

#securityGuardTypeModal .grid-container {
    height: calc(100vh - 200px) !important;
    max-height: 700px;
}

#securityGuardTypeModal .overflow-y-auto {
    overflow-y: auto !important;
}

#securityGuardTypeModal.show {
    overflow: hidden !important;
}

/* 去掉通知公告模块模态框外部的滚轮 */
#notificationModal .modal-content {
    overflow: hidden !important;
}

#notificationModal .modal-body {
    overflow: hidden !important;
}

#notificationModal .grid-container {
    height: calc(100vh - 200px) !important;
    max-height: 700px;
}

#notificationModal .overflow-y-auto {
    overflow-y: auto !important;
}

#notificationModal.show {
    overflow: hidden !important;
}

/* 去掉政策法规模块模态框外部的滚轮 */
#policyModal .modal-content {
    overflow: hidden !important;
}

#policyModal .modal-body {
    overflow: hidden !important;
}

#policyModal .grid-container {
    height: calc(100vh - 200px) !important;
    max-height: 700px;
}

#policyModal .overflow-y-auto {
    overflow-y: auto !important;
}

#policyModal.show {
    overflow: hidden !important;
}

/* 去掉企业文化模块模态框外部的滚轮 */
#companyCultureModal .modal-content {
    overflow: hidden !important;
}

#companyCultureModal .modal-body {
    overflow: hidden !important;
}

#companyCultureModal .grid-container {
    height: calc(100vh - 200px) !important;
    max-height: 700px;
}

#companyCultureModal .overflow-y-auto {
    overflow-y: auto !important;
}

#companyCultureModal.show {
    overflow: hidden !important;
}

/* 修复模态框按钮显示问题 */
/* 核心修复：modal-open类样式 */
.modal-open {
    overflow: hidden;
}

/* 模态框遮罩层样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    opacity: 0.5;
}

/* 模态框容器样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
}

/* 模态框内容样式 */
.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    outline: 0;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* 模态框对话框样式 */
.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
    max-width: 900px; /* 原始值约500px，扩大80%后约900px */
    margin: 1.75rem auto;
}

/* 模态框对话框 - 超大尺寸 */
.modal-xl .modal-dialog {
    max-width: 95%; /* 从90%扩大到95%，几乎充满屏幕宽度 */
}

/* 模态框主体样式 */
.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
    overflow-y: auto;
}

/* 模态框底部样式 - 确保按钮完整显示 */
.modal-footer {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0.75rem !important;
    border-top: 1px solid #dee2e6 !important;
    border-bottom-right-radius: calc(0.375rem - 1px) !important;
    border-bottom-left-radius: calc(0.375rem - 1px) !important;
    position: relative !important;
    z-index: 1000 !important;
    height: auto !important;
    min-height: 60px !important;
    overflow: visible !important;
    margin-top: auto !important;
    /* 关键修复：确保模态框底部不被遮挡 */
    flex-shrink: 0 !important;
}

/* 模态框按钮样式 */
.modal-footer .btn {
    position: relative !important;
    z-index: 1001 !important;
    padding: 0.5rem 1rem !important;
    height: auto !important;
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* 确保按钮不被压缩 */
    flex-shrink: 0 !important;
    margin: 0 0.25rem !important;
}

/* 加强特定模块的模态框按钮样式，确保覆盖所有模块 */
#notificationModal .modal-footer .btn,
#securityGuardTypeModal .modal-footer .btn,
#policyModal .modal-footer .btn,
#companyCultureModal .modal-footer .btn,
#industryInfoTypeModal .modal-footer .btn {
    position: relative !important;
    z-index: 1001 !important;
    padding: 0.5rem 1rem !important;
    height: auto !important;
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* 确保按钮不被压缩 */
    flex-shrink: 0 !important;
    margin: 0 0.25rem !important;
}

/* 确保所有模态框底部都能正确显示 */
#notificationModal .modal-footer,
#securityGuardTypeModal .modal-footer,
#policyModal .modal-footer,
#companyCultureModal .modal-footer,
#industryInfoTypeModal .modal-footer {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0.75rem !important;
    border-top: 1px solid #dee2e6 !important;
    position: relative !important;
    z-index: 1000 !important;
    height: auto !important;
    min-height: 60px !important;
    overflow: visible !important;
    margin-top: auto !important;
    /* 关键修复：确保模态框底部不被遮挡 */
    flex-shrink: 0 !important;
}

/* 修复模态框显示时的滚动条问题 */
.modal.show {
    display: block;
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* 确保模态框内容区域不会挤压底部按钮区域 */
.modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 90vh;
}

.modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
}

/* 确保右侧编辑区域不会影响底部按钮 */
.modal-body > .grid-container {
    display: grid;
    grid-template-columns: 1.8fr 2.0fr;
    gap: 0;
    height: calc(100vh - 300px);
    max-height: 600px;
}