/**
 * ============================================
 * 用户账号删除系统 - 前端样式
 * 子比主题兼容版 - SweetAlert2版本
 * ============================================
 *
 * @author      作者QQ：2163098216
 * @support     问题反馈QQ交流群：463978235
 * @version     1.0.0
 * @license     Copyright © 2025 All Rights Reserved
 *
 * ============================================
 */

/* 步骤指示器 */
.uad-stepper {
    display: flex;
    justify-content: center;
    position: relative;
    margin-bottom: 20px;
}

.uad-stepper:after {
    content: '';
    position: absolute;
    top: 11px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--muted-color, #ddd);
    z-index: 0;
}

.uad-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
    position: relative;
    z-index: 1;
}

.uad-step-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--muted-color, #ddd);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 4px;
    transition: all 0.3s ease-in-out;
}

.uad-step.active .uad-step-number {
    background-color: var(--theme-color, #fa424a);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 0 2px rgba(250, 66, 74, 0.15);
}

.uad-step-label {
    font-size: 11px;
    text-align: center;
    transition: all 0.3s ease;
    line-height: 1.2;
}

.uad-step.active .uad-step-label {
    color: var(--theme-color, #fa424a);
    font-weight: 600;
}

/* 紧凑步骤条 */
.uad-stepper-compact {
    margin-bottom: 12px !important;
}

/* 资产列表 - 横向网格布局 */
.uad-asset-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* 资产项 - 紧凑卡片 */
.uad-asset-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 10px;
    border-radius: 6px;
    background-color: var(--main-bg-light, #f9f9f9);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    position: relative;
}

.uad-asset-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.uad-asset-item-icon {
    font-size: 20px;
    margin-bottom: 6px;
    color: var(--theme-color, #fa424a);
    transition: transform 0.25s ease;
}

.uad-asset-item:hover .uad-asset-item-icon {
    transform: scale(1.1);
}

.uad-asset-item-content {
    width: 100%;
}

.uad-asset-item-title {
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.2;
    color: var(--main-color, #333);
}

.uad-asset-item-value {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 4px 0;
    line-height: 1.2;
    transition: transform 0.25s ease;
}

.uad-asset-item:hover .uad-asset-item-value {
    transform: scale(1.05);
}

.uad-asset-item-detail {
    font-size: 11px;
    margin: 0;
    line-height: 1.3;
    color: var(--muted-color, #999);
}

/* 会员项特殊样式 */
.uad-asset-item-membership {
    border-top: 3px solid var(--theme-color, #fa424a);
}

/* 零值资产样式 */
.uad-asset-item.is-zero {
    opacity: 0.6;
}

.uad-asset-item.is-zero .uad-asset-item-value {
    color: var(--muted-2-color, #bbb);
}

/* 无资产提示 */
.uad-asset-item-none {
    grid-column: 1 / -1;
    text-align: center;
    padding: 16px;
    color: var(--muted-2-color, #999);
    font-size: 12px;
}

/* 移动端单列 */
@media (max-width: 480px) {
    .uad-asset-list {
        grid-template-columns: 1fr;
    }
}

/* 会员进度条 - 紧凑版 */
.uad-membership-progress-compact {
    margin-top: 8px;
    width: 100%;
}

.uad-progress-bar-compact {
    height: 4px;
    background-color: var(--muted-2-color, #eee);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.uad-progress-fill-compact {
    height: 100%;
    background-color: var(--theme-color, #fa424a);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.uad-progress-text-compact {
    display: flex;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    color: var(--muted-color, #999);
}

/* 天数左侧标记 */
.uad-days-left {
    display: inline;
    font-size: 11px;
}

/* 表单样式 - 紧凑化 */
.uad-delete-warning {
    padding: 10px 12px;
    border-radius: 6px;
    line-height: 1.4;
    font-size: 12px;
}

/* 表单栅格 - 两列布局 */
.uad-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .uad-form-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* 表单组 */
.uad-form-group {
    margin-bottom: 0;
}

.uad-form-group label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.uad-form-group .input-group {
    border-radius: 4px;
    overflow: hidden;
}

.uad-form-group .form-control {
    font-size: 13px;
    padding: 6px 10px;
    height: auto;
    min-height: 32px;
}

/* 复选框确认 */
.uad-checkbox-confirm {
    margin-bottom: 12px;
}

.uad-checkbox-confirm .form-checkbox-label {
    display: flex;
    align-items: center;
    font-size: 13px;
    margin: 0;
}

.uad-checkbox-confirm input[type="checkbox"] {
    margin-right: 8px;
    flex-shrink: 0;
}

.uad-checkbox-confirm .text-ellipsis {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 表单操作区 */
.uad-form-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
    justify-content: center;
    align-items: center;
}

.uad-form-actions-right {
    justify-content: flex-end;
}

.uad-form-actions-center {
    justify-content: center;
}

.uad-form-actions-between {
    justify-content: space-between;
}

.uad-form-actions button {
    font-size: 14px;
    padding: 10px 24px;
    height: auto;
    min-height: 40px;
    border-radius: 6px;
    min-width: 110px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.uad-form-actions button.but {
    flex-shrink: 0;
}

/* 取消按钮样式 - 与主题风格一致 */
.uad-form-actions button#uad-cancel-deletion,
.uad-form-actions button#uad-back-to-assets {
    background-color: var(--main-bg-color, #f5f5f5);
    color: var(--main-color, #333);
    border: 1px solid var(--muted-border-color, #ddd);
}

.uad-form-actions button#uad-cancel-deletion:hover,
.uad-form-actions button#uad-back-to-assets:hover {
    background-color: var(--main-bg-light, #e8e8e8);
    border-color: var(--muted-color, #ccc);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 主要按钮增强 */
.uad-form-actions button.jb-red {
    box-shadow: 0 2px 4px rgba(250, 66, 74, 0.2);
}

.uad-form-actions button.jb-red:hover {
    box-shadow: 0 4px 8px rgba(250, 66, 74, 0.3);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .uad-form-actions-between,
    .uad-form-actions-center {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .uad-form-actions-between button,
    .uad-form-actions-center button {
        width: 100%;
        min-width: auto;
    }
}

/* 冷静期说明 */
.uad-cooling-period {
    font-size: 12px;
    margin-top: 8px;
    line-height: 1.4;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.uad-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* SweetAlert2 自定义样式 - 紧凑版 */
.uad-swal-container .swal2-popup {
    width: 36em;
    max-width: 95vw;
    padding: 1.25em;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.uad-swal-container .swal2-title {
    font-size: 1.3em;
    margin-bottom: 0.8em;
    font-weight: 600;
}

.uad-swal-container .swal2-html-container {
    text-align: left;
    overflow: visible;
    font-size: 13px;
}

/* 完全禁用遮罩 - 容器背景透明 */
.uad-swal-container.swal2-container {
    background: none !important;
    background-color: transparent !important;
}

/* 弹窗增强阴影 - 无遮罩时保持视觉层次 */
.uad-swal-popup.swal2-popup {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    border-radius: 8px !important;
}

/* SweetAlert2 渐隐渐显动画 - 无缩放效果 */
.swal2-show {
    animation: swal2-fade-in 0.2s ease-out !important;
}

.swal2-hide {
    animation: swal2-fade-out 0.15s ease-in !important;
}

@keyframes swal2-fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes swal2-fade-out {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}



/* SweetAlert2 按钮样式 */
.uad-swal-container .swal2-actions {
    flex-direction: row !important;
    justify-content: center;
    gap: 12px;
    margin-top: 1em;
}

.uad-swal-container .swal2-cancel {
    background-color: var(--muted-border-color, #e0e0e0) !important;
    color: var(--main-color, #666) !important;
    border: 1px solid var(--muted-border-color, #d0d0d0) !important;
    font-size: 13px !important;
    padding: 8px 20px !important;
    min-width: 100px !important;
}

.uad-swal-container .swal2-cancel:hover {
    background-color: var(--muted-color, #d5d5d5) !important;
}

/* 表单元素动画 */
.uad-form-group input {
    transition: all 0.3s ease;
}

.uad-form-group input:focus {
    box-shadow: 0 0 0 2px rgba(var(--theme-color-rgb, 250, 66, 74), 0.2);
}

/* 按钮动画效果 */
.uad-form-actions button {
    transition: all 0.3s ease;
}

.uad-form-actions button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.uad-form-actions button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 按钮加载状态 */
.uad-form-actions button.is-loading {
    position: relative;
    color: transparent !important;
}

.uad-form-actions button.is-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: buttonLoading 0.8s linear infinite;
}

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

/* 交错淡入动画效果 */
.uad-confirm-form-loaded .uad-form-group {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.uad-confirm-form-loaded .uad-form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.uad-confirm-form-loaded .uad-form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.uad-confirm-form-loaded .uad-form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.uad-confirm-form-loaded .uad-form-group:nth-child(4) {
    animation-delay: 0.4s;
}

.uad-confirm-form-loaded .uad-form-check {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    animation-delay: 0.5s;
}

.uad-confirm-form-loaded .uad-form-actions {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .uad-confirm-form-loaded .uad-form-group,
    .uad-confirm-form-loaded .uad-form-check,
    .uad-confirm-form-loaded .uad-form-actions {
        animation-delay: 0.1s;
    }

    .uad-stepper {
        margin-bottom: 10px;
    }

    .uad-step-label {
        display: none;
    }

    .uad-swal-container .swal2-popup {
        padding: 1em;
    }
}

/* 辅助间距类 */
.mb8 { margin-bottom: 8px; }
.mb10 { margin-bottom: 10px; }
.mb12 { margin-bottom: 12px; }
.mt8 { margin-top: 8px; }

/* 字号辅助类 */
.em12 { font-size: 12px; }
.em13 { font-size: 13px; }

/* 资产标题与通知 */
.uad-assets-header {
    margin-bottom: 10px;
}

.uad-assets-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.uad-assets-notice {
    font-size: 12px;
    line-height: 1.4;
}

/* 资产警告 */
.uad-assets-warning {
    border-radius: 6px;
    padding: 10px 12px;
    line-height: 1.4;
}