/**
 * 重置密码模态框样式
 * 与登录/注册页 auth.css 风格统一
 * 
 * 命名前缀：rp-（reset password）
 * 支持深色模式（跟随 data-auth-theme）
 */

/* ==================== 模态框外层 ==================== */
.rp-layer {
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 
        0 24px 60px rgba(15, 23, 42, 0.18),
        0 8px 20px rgba(15, 23, 42, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    background: #ffffff !important;
    padding: 0 !important;
}

[data-auth-theme="dark"] .rp-layer {
    background: rgba(15, 23, 42, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 
        0 24px 60px rgba(0, 0, 0, 0.6),
        0 8px 20px rgba(0, 0, 0, 0.4) !important;
}

/* 隐藏 LayUI 默认标题栏 */
.rp-layer .layui-layer-title {
    display: none !important;
}

/* 内容区撑满 */
.rp-layer .layui-layer-content {
    overflow: visible !important;
    padding: 0 !important;
    border-radius: 20px !important;
}

/* ==================== 模态框容器 ==================== */
.rp-container {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    padding: 32px 32px 26px;
    animation: rp-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-auth-theme="dark"] .rp-container {
    background: rgba(15, 23, 42, 0.98);
}

@keyframes rp-fade-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 顶部绿色装饰条 */
.rp-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 32px;
    right: 32px;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #6ee7b7 100%);
    border-radius: 0 0 4px 4px;
    opacity: 0.85;
}

/* ==================== 关闭按钮 ==================== */
.rp-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.04);
    border: none;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 16px;
    z-index: 2;
    padding: 0;
    line-height: 1;
}

[data-auth-theme="dark"] .rp-close {
    background: rgba(255, 255, 255, 0.08);
    color: #64748b;
}

.rp-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: rotate(90deg);
}

/* ==================== 头部 ==================== */
.rp-header {
    text-align: center;
    margin-bottom: 24px;
    padding-top: 4px;
}

.rp-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 14px;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.rp-header-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
    pointer-events: none;
}

.rp-header-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

[data-auth-theme="dark"] .rp-header-title {
    color: #f1f5f9;
}

.rp-header-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

[data-auth-theme="dark"] .rp-header-desc {
    color: #94a3b8;
}

/* ==================== 表单 ==================== */
.rp-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rp-label {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.2px;
}

[data-auth-theme="dark"] .rp-label {
    color: #f1f5f9;
}

.rp-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.rp-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 2;
}

.rp-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font-size: 14px;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-sizing: border-box;
    height: 46px;
}

[data-auth-theme="dark"] .rp-input {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.rp-input::placeholder {
    color: #94a3b8;
}

.rp-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    background: #ffffff;
}

[data-auth-theme="dark"] .rp-input:focus {
    background: rgba(30, 41, 59, 0.9);
}

.rp-input-wrapper:focus-within .rp-input-icon {
    color: #10b981;
}

/* ==================== 短信验证码行 ==================== */
.rp-sms-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.rp-sms-row .rp-input-wrapper {
    flex: 1;
    min-width: 0;
}

.rp-sms-btn {
    padding: 0 18px;
    font-size: 13px;
    font-weight: 600;
    color: #10b981;
    background: #ecfdf5;
    border: 1.5px solid #d1fae5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    height: 46px;
    flex-shrink: 0;
    font-family: inherit;
}

[data-auth-theme="dark"] .rp-sms-btn {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.rp-sms-btn:hover:not(:disabled) {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.rp-sms-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== 底部按钮 ==================== */
.rp-footer {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

[data-auth-theme="dark"] .rp-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.rp-btn {
    flex: 1;
    height: 46px;
    padding: 0 20px;
    font-size: 14.5px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    border: none;
    outline: none;
}

/* 主要按钮（确认重置） */
.rp-btn-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
    position: relative;
    overflow: hidden;
}

.rp-btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s;
}

.rp-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.rp-btn-submit:hover:not(:disabled)::before {
    left: 100%;
}

.rp-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 次要按钮（取消） */
.rp-btn-cancel {
    background: #ffffff;
    color: #475569;
    border: 1.5px solid #e2e8f0;
}

[data-auth-theme="dark"] .rp-btn-cancel {
    background: rgba(30, 41, 59, 0.5);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}

.rp-btn-cancel:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #10b981;
    color: #10b981;
}

[data-auth-theme="dark"] .rp-btn-cancel:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.1);
}

/* ==================== 提示文本 ==================== */
.rp-hint {
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 2px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rp-hint i {
    font-size: 12px;
    flex-shrink: 0;
}

/* ==================== 响应式 ==================== */
@media (max-width: 576px) {
    .rp-container {
        padding: 26px 22px 22px;
    }
    
    .rp-container::before {
        left: 22px;
        right: 22px;
    }
    
    .rp-header-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
        border-radius: 14px;
    }
    
    .rp-header-title {
        font-size: 18px;
    }
    
    .rp-header-desc {
        font-size: 12.5px;
    }
    
    .rp-sms-btn {
        padding: 0 14px;
        font-size: 12.5px;
    }
    
    .rp-footer {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .rp-btn {
        width: 100%;
        height: 44px;
        font-size: 14px;
    }
}