/* 全局圆角统一为 1.25rem (20px) - 独立模块化样式 */
/* 遵循规则：不覆盖现有 CSS，使用独立类名 */
/* 排除：按钮和 50% 圆角元素 */

/* ========================================
   卡片和容器类
   ======================================== */
.card,
.card-body,
.card-header,
.card-footer,
.modal-content,
.dropdown-menu,
.popover,
.alert,
.list-group,
.list-group-item:first-child,
.list-group-item:last-child,
.nav-tabs,
.nav-pills:not(.gs-segmented) .nav-link,
.page-item:first-child .page-link,
.page-item:last-child .page-link,
.badge:not(.badge-circle),
.progress,
.breadcrumb,
.accordion-button,
.accordion-item:first-child,
.accordion-item:last-child,
.offcanvas,
.modal-header,
.modal-footer,
.table,
.navbar,
.nav:not(.gs-segmented),
.rounded {
    border-radius: 1.25rem !important;
}

/* ========================================
   特定组件覆盖
   ======================================== */
/* 下拉菜单项 */
.dropdown-item:first-child {
    border-top-left-radius: 1.25rem !important;
    border-top-right-radius: 1.25rem !important;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 1.25rem !important;
    border-bottom-right-radius: 1.25rem !important;
}

/* 表单控件与输入组圆角：见 form-system.css */

/* Tab 导航 */
.nav-tabs .nav-link {
    border-top-left-radius: 1.25rem !important;
    border-top-right-radius: 1.25rem !important;
}

/* Pill 导航 */
.nav-pills:not(.gs-segmented) .nav-link {
    border-radius: 1.25rem !important;
}

/* 分页 */
.pagination {
    border-radius: 1.25rem !important;
}

/* 进度条 */
.progress-bar {
    border-radius: 1.25rem !important;
}

/* Accordion */
.accordion-item {
    border-radius: 1.25rem !important;
}

.accordion-button:not(.collapsed) {
    border-top-left-radius: 1.25rem !important;
    border-top-right-radius: 1.25rem !important;
}

/* ========================================
   自定义组件覆盖
   ======================================== */
/* 统计卡片 */
.stat-card,
.dashboard-card,
.hero-card,
.info-card {
    border-radius: 1.25rem !important;
}

/* 通知栏 */
.notification-bar {
    border-radius: 1.25rem !important;
}

/* Chat 相关 */
.chat-application .content-area-wrapper,
.chat-application .chat-profile-sidebar {
    border-radius: 1.25rem !important;
}

/* 侧边栏菜单项 - 排除按钮样式的圆角 */
/* ✅ 父菜单使用 12px 圆角（修改为 12px，与 sidebar.blade.php 中的 4px 区分） */
/* ❌ 已移除全局强制覆盖，让 sidebar.blade.php 中的精确控制生效 */
.main-menu .navigation .parent-node-row:not(.btn) {
    border-radius: 12px !important;  /* ✅ 修改为 12px */
}

/* ❌ 移除子菜单 overlay 的全局 20px 圆角规则，让 sidebar.blade.php 中的 4px 规则生效 */
/* .main-menu .navigation .child-hover-overlay:not(.btn) {
    border-radius: 1.25rem !important;
} */

/* Toastr 通知圆角：见 feedback-system.css */

/* Swiper 容器 */
.swiper-container {
    border-radius: 1.25rem !important;
}

/* Data Tables */
.dataTables_wrapper .table {
    border-radius: 1.25rem !important;
}

/* ========================================
   Ecommerce 组件
   ======================================== */
.ecommerce-application .sidebar-shop,
.ecommerce-application .ecommerce-header-items,
.ecommerce-application .grid-view .card,
.ecommerce-application .list-view .card {
    border-radius: 1.25rem !important;
}

/* ========================================
   排除规则：保持原有圆角的元素
   ======================================== */
/* 1. 所有按钮保持原有圆角 */
.btn,
button,
[type="button"],
[type="reset"],
[type="submit"] {
    /* 不修改按钮的 border-radius，保持原有值 */
}

/* 2. 50% 圆形元素保持不变 */
.avatar,
.rounded-circle,
[style*="border-radius: 50%"],
[style*="border-radius:50%"] {
    /* 不修改，保持 50% 圆角 */
}

/* 3. 999px 准圆形元素保持不变 */
[style*="border-radius: 999px"],
[style*="border-radius:999px"] {
    /* 不修改，保持 999px 圆角 */
}

/* ========================================
   特殊处理：noUi-Slider 滑块组件
   ======================================== */
.noUi-target {
    border-radius: 1.25rem !important;
}

/* ========================================
   特殊处理：侧边栏子菜单激活背景
   ======================================== */
/* ❌ 已移除全局 20px 圆角规则，改为在 sidebar.blade.php 中精确控制为 4px */
/* 子菜单激活背景 overlay 需要 4px 小圆角（扁平化设计） */
/* .child-hover-overlay {
    border-radius: 1.25rem !important;
} */

/* ========================================
   特殊处理：Badge 徽章
   ======================================== */
/* Badge 使用 1.25rem 圆角，但圆形 badge 保持 50% */
.badge:not(.rounded-circle):not(.badge-circle) {
    border-radius: 1.25rem !important;
}

/* ========================================
   Loader 加载动画
   ======================================== */
.ball-pulse > div,
.ball-grid-pulse > div,
.ball-clip-rotate > div,
.ball-rotate > div,
.cube-transition > div,
.ball-zig-zag > div,
.ball-triangle-path > div,
.ball-scale > div {
    /* 不修改 loader 动画的圆角，通常是 50% */
}

/* ========================================
   覆盖所有自定义 CSS 文件中的小圆角
   ======================================== */
/* Dashboard 统计卡片 */
.stat-card .stat-progress-fill {
    border-radius: 1.25rem !important;
}

/* Dashboard 英雄卡片 */
.card-total-balance {
    border-radius: 1.25rem !important;
}

/* 通知栏 */
.notification-bar-container {
    border-radius: 1.25rem !important;
}

/* ========================================
   BS Stepper 步骤向导组件
   ======================================== */
/* BS Stepper 主容器 */
.bs-stepper {
    border-radius: 1.25rem !important;
}

/* BS Stepper 头部 */
.bs-stepper .bs-stepper-header {
    border-top-left-radius: 1.25rem !important;
    border-top-right-radius: 1.25rem !important;
}

/* BS Stepper 内容区域 */
.bs-stepper .bs-stepper-content {
    border-bottom-left-radius: 1.25rem !important;
    border-bottom-right-radius: 1.25rem !important;
}

/* BS Stepper 步骤盒子 */
.bs-stepper .bs-stepper-box {
    border-radius: 0.35rem !important;
}

/* BS Stepper 卡片内容 */
.bs-stepper .card {
    border-radius: 1.25rem !important;
}

/* 向导卡片 */
.wizard-modern,
.modern-wizard-example {
    border-radius: 1.25rem !important;
}

/* 向导步骤内的卡片 */
.wizard-modern .card,
.modern-wizard-example .card {
    border-radius: 1.25rem !important;
}
