/* PIGRAV_Release_Version/common/change_password_modal/change_password_modal.css */

/* --- 基本样式 (从 login_modal.css 复制并调整) --- */
.cp-modal-overlay { /* Change Password Modal Overlay */
    position: fixed; /* 固定定位 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* 半透明背景 */
    display: flex; /* Flex 布局居中 */
    justify-content: center;
    align-items: center;
    z-index: 10001; /* 比登录框高一级？或者同级后出现的优先 */
    opacity: 1;
    transition: opacity 0.3s ease;
}

.cp-modal-overlay.hidden {
    opacity: 0;
    pointer-events: none; /* 隐藏时不可交互 */
}

.cp-modal-content {
    background-color: #2d3748; /* 深灰色背景 */
    color: #e2e8f0; /* 浅灰色文字 */
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    width: 90%;
    max-width: 400px; /* 最大宽度 */
    text-align: center;
}

.cp-close-modal-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #a0aec0; /* 中灰色 */
    cursor: pointer;
    line-height: 1;
}

.cp-close-modal-btn:hover {
    color: #e2e8f0; /* 悬停时变亮 */
}

.cp-modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #ffffff;
    font-weight: 600;
}

.cp-modal-body {
    text-align: left;
}

.cp-form-group {
    margin-bottom: 15px;
    position: relative;
}

.cp-form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #a0aec0;
    white-space: nowrap;
}

.cp-form-group input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #4a5568; /* 边框颜色 */
    border-radius: 4px;
    background-color: #1a202c; /* 输入框背景色 */
    color: #e2e8f0; /* 输入文字颜色 */
    font-size: 16px;
    box-sizing: border-box;
}

.cp-form-group input:focus {
    outline: none;
    border-color: #4299e1; /* 聚焦时边框变蓝 */
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
}

.cp-form-group input.input-error {
    border-color: #f56565; /* 红色边框 */
    box-shadow: 0 0 0 2px rgba(245, 101, 101, 0.5); /* 红色阴影 */
}

/* 新密码的标签和提示 */
.cp-label-wrapper {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}

.cp-label-wrapper label {
    margin-bottom: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.cp-password-hint {
    font-size: 12px;
    color: #a0aec0;
    white-space: nowrap;
}

.cp-form-actions {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cp-primary-btn {
    background-color: #4299e1; /* 主按钮蓝色 */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.2s ease;
}

.cp-primary-btn:hover {
    background-color: #2b6cb0; /* 悬停时深蓝色 */
}

.cp-primary-btn:disabled {
    background-color: #a0aec0; /* 禁用时灰色 */
    cursor: not-allowed;
}

/* 忘记原密码的链接按钮 */
.cp-forgot-old-password-btn {
    background: none;
    border: none;
    color: #63b3ed; /* 链接按钮蓝色 */
    cursor: pointer;
    padding: 10px 0 0;
    font-size: 14px;
    text-decoration: underline;
    margin-top: 5px; /* 与上方元素间距 */
    align-self: flex-end; /* 靠右对齐 */
}

.cp-forgot-old-password-btn:hover {
    color: #90cdf4; /* 悬停时浅蓝色 */
}

.cp-modal-message {
    color: #f56565; /* 红色错误消息 */
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 15px;
    min-height: 1.2em; /* 占据空间防止跳动 */
    text-align: center;
}
.cp-modal-message.success {
    color: #48bb78; /* 绿色成功消息 */
}

/* 模态框抖动动画 (可复用 login_modal 的) */
@keyframes cp-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.cp-modal-shake .cp-modal-content { /* 应用到 modal-content 实现抖动 */
    animation: cp-shake 0.5s ease-in-out;
} 