/* captcha-modal.css — 2026-11-10 从 View/Widget/captcha_modal.html 抽出；z-index 用 config 变量，仍内联 */
.captcha-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.captcha-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
}

.captcha-modal-content {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 10px;
    overflow: auto;
    box-sizing: border-box;
    animation: modalShow 0.18s ease-out;
}

.captcha-modal-header {
    padding: 14px 12px 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.captcha-modal-header h3 {
    margin: 0;
    font-size: 15px;
    line-height: 22px;
    color: #1a1a2e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.captcha-header-msg {
    display: none;
    font-size: 12px;
    line-height: 20px;
    font-weight: 400;
    padding: 0 8px;
    border-radius: 4px;
    color: #64748b;
    background: #f1f5f9;
    white-space: nowrap;
    animation: tc-fadeIn 0.2s;
}
.captcha-header-msg[data-type="error"] { color: #C62828; background: #fef2f2; }
.captcha-header-msg[data-type="success"] { color: #15803d; background: #f0fdf4; }

.captcha-modal-close {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s, color 0.15s;
}

.captcha-modal-close:hover {
    background: #f1f5f9;
    color: #1a1a2e;
}

.captcha-modal-body {
    padding: 16px;
    min-height: 160px;
}

@keyframes modalShow {
    0% { opacity: 0; transform: translate(-50%, -48%); }
    100% { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes modalHide {
    0% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, -48%); }
}

/* 加载状态 */
.captcha-loading {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.captcha-spinner {
    width: 26px;
    height: 26px;
    border: 2px solid #e2e8f0;
    border-top-color: #C62828;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
