/**
 * 小程序广告验证 - 前端样式
 */

.mp-ad-verify-block {
    width: 100%;
    margin: 20px 0;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mp-ad-verify-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.mp-ad-verify-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.mp-ad-verify-body {
    display: flex;
    padding: 25px 20px;
    gap: 30px;
    align-items: flex-start;
}

.mp-ad-verify-left {
    flex-shrink: 0;
    text-align: center;
}

.mp-ad-verify-qrcode {
    width: 160px;
    height: 160px;
    border: 4px solid #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 小程序码容器 */
.mp-ad-verify-qrcode-wrapper {
    width: 160px;
    min-height: 160px;
    position: relative;
}

/* 加载中状态 */
.mp-ad-verify-qrcode-loading {
    width: 160px;
    height: 160px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    text-align: center;
    gap: 10px;
}

/* 加载旋转动画 */
.mp-ad-verify-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e5e5;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: mp-ad-verify-spin 0.8s linear infinite;
}

@keyframes mp-ad-verify-spin {
    to { transform: rotate(360deg); }
}

/* 错误状态 */
.mp-ad-verify-qrcode-error {
    width: 160px;
    height: 160px;
    border: 2px solid #ffccc7;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ff4d4f;
    font-size: 12px;
    text-align: center;
    padding: 10px;
    gap: 8px;
    background: #fff2f0;
}

.mp-ad-verify-qrcode-error-icon {
    font-size: 28px;
    line-height: 1;
}

.mp-ad-verify-qrcode-error-msg {
    line-height: 1.4;
    word-break: break-all;
}

.mp-ad-verify-qrcode-retry {
    padding: 4px 16px;
    font-size: 12px;
    color: #667eea;
    background: #fff;
    border: 1px solid #667eea;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.mp-ad-verify-qrcode-retry:hover {
    background: #667eea;
    color: #fff;
}

/* 文章ID提示 */
.mp-ad-verify-post-id-tip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
    border: 1px solid #d4dbff;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.mp-ad-verify-post-id-tip .post-id-label {
    color: #666;
    font-weight: 500;
}

.mp-ad-verify-post-id-tip .post-id-value {
    color: #667eea;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    padding: 2px 8px;
    background: #fff;
    border-radius: 4px;
    margin: 0 6px;
    font-family: 'Courier New', monospace;
}

.mp-ad-verify-post-id-tip .post-id-hint {
    color: #999;
    font-size: 12px;
}

/* 备用图片提示 */
.mp-ad-verify-qrcode-tip {
    font-size: 11px;
    color: #faad14;
    text-align: center;
    margin-top: 6px;
    line-height: 1.3;
}

.mp-ad-verify-right {
    flex: 1;
    min-width: 0;
}

.mp-ad-verify-desc {
    font-size: 14px;
    color: #333;
    margin-bottom: 18px;
    line-height: 1.6;
}

.mp-ad-verify-code-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.mp-ad-verify-code-inputs .code-input {
    width: 48px;
    height: 52px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.mp-ad-verify-code-inputs .code-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mp-ad-verify-code-inputs .code-input.filled {
    border-color: #667eea;
}

.mp-ad-verify-result {
    min-height: 24px;
    margin-bottom: 12px;
    font-size: 14px;
}

.mp-ad-verify-result.success {
    color: #52c41a;
}

.mp-ad-verify-result.error {
    color: #ff4d4f;
}

.mp-ad-verify-tips {
    font-size: 13px;
    color: #666;
    margin-bottom: 18px;
    line-height: 1.5;
    padding: 10px 12px;
    background: #f6f8fa;
    border-radius: 6px;
}

.mp-ad-verify-tips .tip-icon {
    margin-right: 4px;
}

.mp-ad-verify-tips strong {
    color: #667eea;
}

.mp-ad-verify-submit {
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.1s;
}

.mp-ad-verify-submit:hover {
    opacity: 0.9;
}

.mp-ad-verify-submit:active {
    transform: scale(0.98);
}

.mp-ad-verify-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mp-ad-verify-content {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .mp-ad-verify-body {
        flex-direction: column;
        align-items: center;
    }
    
    .mp-ad-verify-left {
        margin-bottom: 10px;
    }
    
    .mp-ad-verify-right {
        width: 100%;
    }
    
    .mp-ad-verify-code-inputs {
        justify-content: center;
    }
}
