/**
 * 模态框工具样式
 * 
 * 为 modal-utils.js 提供的模态框添加样式
 * 使用父主题的 CSS 变量确保样式统一
 * 
 * @package    Hui
 * @since      1.0.0
 */

/* 遮罩层容器 */
.hui-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s var(--ease-smooth, ease);
}

/* 显示状态 */
.hui-modal-overlay.is-active {
    opacity: 1;
}

/* 关闭动画 */
.hui-modal-overlay.is-closing {
    opacity: 0;
}

/* 模态框内容样式 */
.hui-modal-content {
    padding: 0.5rem 0;
    color: var(--color-text);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.hui-modal-content p {
    margin: 0;
}

/* 模态框本身不需要额外的定位，因为在遮罩层内居中 */
.hui-modal-overlay .modal {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    z-index: 1;
    margin: 0;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    :root:not(.light) .hui-modal-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
}

.dark .hui-modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}
