/*=============================================
=                   浮动标签输入框                   =
=============================================*/



.material-input {
    position: relative;
}

.material-input .form-control,
.material-input .form-select {
    width: 100%;
    min-height: 48px;
    padding: 0.5rem 0.8rem 0.5rem;
    /*  border: none; */
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: var(--bs-body-color);
    font-family: inherit;
    box-sizing: border-box;
}

.material-input .form-control::placeholder {
    color: transparent;
    transition: all 0.2s ease;
}

.material-input label {
    position: absolute;
    top: 1rem;
    left: 0.8rem;
    padding: 0 4px;
    background: var(--bs-body-bg);
    color: var(--bs-theme-500);
    pointer-events: none;
    transition: all 0.2s ease;
    font-size: 1rem;
    line-height: 1;
    transform-origin: left top;
}

.card .material-input {
    background: var(--bs-theme-component-bg);
}

.card .material-input label {
    background: var(--bs-theme-component-bg);
}

/* .material-input .form-control:not(:placeholder-shown) {
    border-color: var(--bs-primary);
} */

.material-input .form-control:focus~label,
.material-input .form-control:not(:placeholder-shown)~label,
.material-input .form-select+label {
    top: -0.4375rem;
    left: calc(0.8rem - 4px);
    font-size: 0.875rem;
    color: var(--bs-primary);
}

.material-input .form-control:focus::placeholder {
    color: var(--bs-theme-500);
    transition-delay: 0.2s;
}

.material-input.focused label {
    color: var(--bs-primary);
}

/*============  End of 浮动标签输入框  =============*/

/*=============================================
=                   插件切换开关容器                   =
=============================================*/

/* 插件切换开关容器 */
.plugin-toggle-group {
    background: var(--bs-theme-component-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-card-border-radius, 1rem);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.plugin-toggle-group:focus-within {
    border-color: var(--bs-primary-border-subtle);
}

/* 头部样式 */
.plugin-toggle-header {
    padding: var(--bs-card-cap-padding-y, 1rem) var(--bs-card-cap-padding-x, 1rem);
    transition: all 0.2s ease;
}

/* 内容区 - 使用max-height实现平滑过渡 */
.plugin-toggle-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 var(--bs-card-spacer-x, 1rem);
    transition: all 0.3s ease;
}

/* 展开状态 - 使用足够大的max-height值 */
.plugin-toggle-header:has(.form-switch .form-check-input:checked)~.plugin-toggle-content {
    max-height: 500px;
    /* 确保大于实际内容高度 */
    opacity: 1;
    padding-bottom: var(--bs-card-cap-padding-y, 1rem);
    overflow-y: auto;
    overflow-x: hidden;
}

/* 开关视觉反馈 */
.plugin-toggle-header .form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.plugin-toggle-header .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* 内容区内部动画 */
.plugin-toggle-content>* {
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.plugin-toggle-header:has(.form-switch .form-check-input:checked)~.plugin-toggle-content>* {
    transform: translateY(0);
    opacity: 1;
}

/* 延迟子元素动画，创建阶梯效果 */
.plugin-toggle-content>*:nth-child(1) {
    transition-delay: 0.05s;
}

.plugin-toggle-content>*:nth-child(2) {
    transition-delay: 0.1s;
}

.plugin-toggle-content>*:nth-child(3) {
    transition-delay: 0.15s;
}

.plugin-toggle-content>*:nth-child(4) {
    transition-delay: 0.2s;
}

.plugin-toggle-content>*:nth-child(5) {
    transition-delay: 0.25s;
}

.plugin-toggle-content>*:nth-child(6) {
    transition-delay: 0.3s;
}

.plugin-toggle-content>*:nth-child(7) {
    transition-delay: 0.35s;
}

.plugin-toggle-content>*:nth-child(8) {
    transition-delay: 0.4s;
}

.plugin-toggle-content>*:nth-child(9) {
    transition-delay: 0.45s;
}

.plugin-toggle-content>*:nth-child(10) {
    transition-delay: 0.5s;
}

/* 兼容性回退：如果没有:has()支持 */
@supports not selector(:has(*)) {
    .plugin-toggle-content {
        display: block;
        max-height: 100%;
        opacity: 1;
        padding-bottom: var(--bs-card-cap-padding-y, 1rem);

    }

    .plugin-toggle-content>* {
        transform: none;
        opacity: 1;
    }

    .plugin-toggle-header .form-check-input:checked~.plugin-toggle-content {
        display: block;
    }

}

/*============  End of 插件切换开关容器  =============*/

/*=============================================
=                   其他BS5输入适配                   =
=============================================*/

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/*============  End of 其他BS5输入适配  =============*/

/*=============================================
=                   g个性化页面所用                   =
=============================================*/

/* 圆形颜色输入 */
.aether-standard-color,.aether-recommended-color {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    color: var(--c);
    background-color: var(--c);
}

.aether-standard-color:hover,.aether-recommended-color:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px currentColor;
}

.aether-standard-color.selected,.aether-recommended-color.selected {
    border: 2px solid var(--bs-white);
    box-shadow: 0 0 0 2px currentColor;
}

/* 自定义颜色模式选择器 */
.aether-theme-selector {
    position: relative;
}


.aether-theme-option {
    position: relative;
}

/* 图标选项卡片 */
.custom-form-check-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-form-check-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25em;
    border: 2px solid var(--bs-border-color);
    border-radius: 0.5em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 7.5em;
}

.custom-form-check-label i {
    font-size: 2.5em;
}

.custom-form-check-label span {
    font-size: 1em;
    font-weight: 500;
}

.custom-form-check-input:checked~.custom-form-check-label {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    box-shadow: 0 0 0 0.1875em rgba(var(--bs-primary-rgb), 0.3);
}

.custom-form-check-label:hover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

/*============  End of g个性化页面所用  =============*/