/**
 * AMMF WebUI 抑制管理器页面样式
 * 基于MD3设计系统规范
 */

/* 抑制管理器容器 */
.suppress-manager-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-s);
    position: relative;
    min-height: 300px;
}

.filter-options {
    display: flex;
    align-items: center;
}

  checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

  checkbox input {
    margin-right: var(--spacing-s);
}

/* 配置应用列表 */
.configured-apps-section {
    margin-bottom: var(--spacing-xl);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-m);
}

.section-header h3 {
    font: var(--headline-s);
    margin: 0;
    color: var(--on-surface);
}

.app-count {
    background-color: var(--primary-container);
    color: var(--on-primary-container);
    font: var(--label-m);
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

/* 应用卡片样式 */
.app-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-m);
}

.app-card {
    display: flex;
    align-items: center;
    padding: var(--spacing-m);
    border-radius: var(--border-radius-l);
    background-color: var(--surface-container);
    transition: background-color var(--tra), transform var(--tra);
    position: relative;
    overflow: hidden;
}

.app-card:hover {
    background-color: var(--surface-container-high);
    transform: translateY(-2px);
}

.app-card.system-app {
    background-color: var(--surface-container-low);
}

.app-card.disabled {
    opacity: 0.7;
}

.app-icon, .app-icon-placeholder {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-s);
    margin-right: var(--spacing-m);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface-container-high);
    overflow: hidden;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-icon-placeholder .material-symbols-rounded {
    font-size: 28px;
    color: var(--on-surface-variant);
}

.app-info {
    flex: 1;
    min-width: 0;
}

.app-name {
    font: var(--title-m);
    color: var(--on-surface);
    margin: 0 0 var(--spacing-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.package-name {
    font: var(--body-s);
    color: var(--on-surface-variant);
    margin: 0 0 var(--spacing-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.process-count, .app-version {
    font: var(--label-s);
    color: var(--primary);
}

.app-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-s);
    margin-left: var(--spacing-m);
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch span {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface-container-highest);
    border: 1px solid var(--outline);
    transition: var(--tra);
    border-radius: 20px;
}

.toggle-switch span:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--outline);
    transition: var(--tra);
    border-radius: 50%;
}

.toggle-switch input:checked + span {
    background-color: var(--primary);
    border-color: var(--primary);
}

.toggle-switch input:checked + span:before {
    transform: translateX(16px);
    background-color: var(--on-primary);
}
/* 对话框样式 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

/* 浮动操作按钮 */
.fab-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background-color: var(--primary);
    color: var(--on-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--tra), background-color var(--tra);
    z-index: 1500;
}

.fab-button:hover {
    background-color: color-mix(in oklch, var(--primary) 90%, black);
    transform: translateY(-2px);
}

.fab-button:active {
    transform: translateY(0);
}

  .fab-button.material-symbols-rounded {
    font-size: 24px;
}

/* 进程配置样式 */
.process-list-container {
    margin-top: var(--spacing-l);
}

.process-list-header {
    margin-bottom: var(--spacing-m);
}

.process-list-header h4 {
    font: var(--title-m);
    margin: 0;
    color: var(--on-surface);
}

.process-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-m);
}

.process-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-s);
}

/* 加载占位符 */
.loading-placeholder {
    padding: var(--spacing-m);
    text-align: center;
    color: var(--on-surface-variant);
    font: var(--body-m);
}

/* 应用信息头部 */
.app-info-header {
    margin-bottom: var(--spacing-l);
    padding-bottom: var(--spacing-m);
    border-bottom: 1px solid var(--outline-variant);
}

/* 加载遮罩 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid var(--primary-container);
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式布局 */
@media (max-width: 768px) {
    .app-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

}

@media (max-width: 480px) {
    .app-list {
        grid-template-columns: 1fr;
    }
    
    .app-actions {
        flex-direction: column;
    }
    
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }

}
.dialog {
    background-color: var(--surface-container);
    border-radius: var(--border-radius-l);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: dialog-appear 0.3s ease;
}

@keyframes dialog-appear {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-m) var(--spacing-l);
    border-bottom: 1px solid var(--outline-variant);
}

.dialog-header h3 {
    font: var(--headline-s);
    margin: 0;
    color: var(--on-surface);
}

.dialog-close {
    background: none;
    border: none;
    color: var(--on-surface-variant);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--tra);
}

.dialog-close:hover {
    background-color: var(--surface-container-high);
}

.dialog-content {
    padding: var(--spacing-l);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-s);
    padding: var(--spacing-m) var(--spacing-l);
    border-top: 1px solid var(--outline-variant);
}

/* 按钮样式 */
.button {
    background-color: var(--surface-container-high);
    color: var(--primary);
    border: none;
    border-radius: var(--border-radius-s);
    padding: 8px 16px;
    font: var(--label-l);
    cursor: pointer;
    transition: background-color var(--tra), transform var(--tra);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.button:hover {
    background-color: var(--surface-container-highest);
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button.filled {
    background-color: var(--primary);
    color: var(--on-primary);
}

.button.filled:hover {
    background-color: color-mix(in oklch, var(--primary) 90%, black);
}

/* 输入框样式 */
.input-field {
    position: relative;
    margin-bottom: var(--spacing-m);
    width: 100%;
}

.input-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--outline);
    border-radius: var(--border-radius-s);
    background-color: var(--surface-container-highest);
    color: var(--on-surface);
    font: var(--body-l);
    transition: border-color var(--tra);
}

.input-field input:focus {
    border-color: var(--primary);
    outline: none;
}

.input-field input::placeholder {
    color: var(--on-surface-variant);
}

/* 搜索容器 */
.search-container {
    display: flex;
    gap: var(--spacing-m);
    margin-bottom: var(--spacing-l);
    align-items: center;
}

.search-container .input-field {
    flex: 1;
    margin-bottom: 0;
}

/* 手动添加区域 */
.manual-add {
    display: flex;
    gap: var(--spacing-m);
    margin-top: var(--spacing-l);
    padding-top: var(--spacing-m);
    border-top: 1px solid var(--outline-variant);
}

.manual-add .input-field {
    flex: 1;
    margin-bottom: 0;
}

/* 空状态提示 */
.empty-state {
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--on-surface-variant);
    font: var(--body-l);
    background-color: var(--surface-container-low);
    border-radius: var(--border-radius-m);
}

/* MD3输入字段 */
.md3-input-field {
    position: relative;
    flex: 1;
}

.md3-input-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--outline);
    border-radius: var(--border-radius-s);
    background-color: var(--surface-container-highest);
    color: var(--on-surface);
    font: var(--body-l);
    transition: border-color var(--tra);
}

.md3-input-field input:focus {
    border-color: var(--primary);
    outline: none;
}

/* 新增进程列表样式 */
.process-list-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-s);
    border-radius: var(--border-radius-s);
    background-color: var(--surface-container-low);
    margin-bottom: var(--spacing-xs);
}

.process-list-item:hover {
    background-color: var(--surface-container-high);
}