/* reCAPTCHA 框架样式 */

/* 模态框样式 */
.recaptcha-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.recaptcha-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 模态框内容 */
.recaptcha-modal-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
}

/* 模态框头部 */
.recaptcha-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recaptcha-modal-title {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.recaptcha-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.recaptcha-modal-close:hover {
    background-color: #f0f0f0;
}

/* 模态框主体 */
.recaptcha-modal-body {
    padding: 20px;
}

.recaptcha-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    min-height: 78px;
    align-items: center;
}

/* 模态框底部 */
.recaptcha-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.recaptcha-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.recaptcha-btn-primary {
    background-color: #4285f4;
    color: white;
}

.recaptcha-btn-primary:hover {
    background-color: #3367d6;
}

.recaptcha-btn-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.recaptcha-btn-secondary:hover {
    background-color: #e0e0e0;
}

.recaptcha-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 加载状态 */
.recaptcha-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.recaptcha-loading.show {
    display: block;
}

.recaptcha-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4285f4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: recaptcha-spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* 错误状态 */
.recaptcha-error {
    display: none;
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

.recaptcha-error.show {
    display: block;
}

/* 成功状态 */
.recaptcha-success {
    display: none;
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

.recaptcha-success.show {
    display: block;
}

/* 内联样式 */
.recaptcha-inline {
    margin: 10px 0;
}

.recaptcha-inline .recaptcha-error {
    margin-top: 10px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .recaptcha-modal-content {
        width: 95%;
    }
    
    .recaptcha-modal-header {
        padding: 12px 15px;
    }
    
    .recaptcha-modal-body {
        padding: 15px;
    }
    
    .recaptcha-modal-footer {
        padding: 12px 15px;
        flex-direction: column;
    }
    
    .recaptcha-btn {
        width: 100%;
    }
}