/* RDAI WX3in1 前端样式 */

/* 设置表单容器居中 */
.rdai-wx3in1-settings-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 50vh;
    padding: 20px;
}

.rdai-wx3in1-settings-form,
.rdai-wx3in1-use-form,
.rdai-wx3in1-tasks-list {
    max-width: 800px;
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 设置表单特别样式 */
.rdai-wx3in1-settings-container .rdai-wx3in1-settings-form {
    margin: 0;
    max-width: 700px;
}

/* API输入框样式优化 */
.rdai-wx3in1-settings-form .form-group input[onclick] {
    cursor: pointer;
}

.rdai-wx3in1-settings-form .form-group input[onclick]:focus {
    cursor: text;
}

.rdai-wx3in1-settings-form h3,
.rdai-wx3in1-use-form h3,
.rdai-wx3in1-tasks-list h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.cost-estimate {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 16px;
    font-weight: 600;
}

.cost-estimate #estimated-cost {
    color: #0073aa;
}

.status-pending {
    color: #0073aa;
}

.status-processing {
    color: #d63638;
}

.status-completed {
    color: #00a32a;
}

.status-failed {
    color: #d63638;
}

.button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.button:hover {
    background: #005a87;
}

.button-primary {
    background: #0073aa;
}

.button-test {
    background: #00a32a !important;
    border-color: #00a32a !important;
}

.button-test:hover {
    background: #008a20 !important;
    border-color: #008a20 !important;
}

.api-divider {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #ddd;
}

.form-actions {
    margin-bottom: 30px;
}

.api-help {
    margin-top: 30px;
}

.rdai-settings-success {
    border-left: 4px solid #d63384 !important;
    background-color: #f8f9fa !important;
    padding: 15px !important;
    margin: 20px 0 !important;
}

.rdai-settings-success p {
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rdai-settings-success strong {
    font-size: 16px !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .rdai-wx3in1-settings-container {
        padding: 10px;
        min-height: auto;
    }
    
    .rdai-wx3in1-settings-form,
    .rdai-wx3in1-use-form,
    .rdai-wx3in1-tasks-list {
        padding: 15px;
        margin: 10px 0;
    }
    
    .rdai-wx3in1-settings-container .rdai-wx3in1-settings-form {
        max-width: 100%;
        margin: 0;
    }
    
    .wp-list-table {
        font-size: 12px;
    }
    
    .wp-list-table th,
    .wp-list-table td {
        padding: 8px 4px;
    }
}

/* 风格预览模态框 */
.rdai-wx3in1-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rdai-wx3in1-modal .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.rdai-wx3in1-modal .close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.rdai-wx3in1-modal .close:hover,
.rdai-wx3in1-modal .close:focus {
    color: #000;
}

.rdai-wx3in1-modal h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

#style-preview-content {
    margin-top: 20px;
}

/* 旋转动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 确保spinner默认隐藏，只有is-active时显示 */
.spinner {
    display: none;
}

.spinner.is-active {
    display: inline-block;
}

/* 说明文字统一小字体样式 */
.form-group .description,
p.description,
.api-help,
.api-help p,
.api-help ol,
.api-help ol li,
.security-notice {
    font-size: 12px !important;
    color: #666 !important;
    line-height: 1.5;
}

.api-help h4 {
    font-size: 13px !important;
    margin-top: 15px;
    margin-bottom: 8px;
    color: #555;
}

.api-help code {
    font-size: 11px !important;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
}

/* 输出方式说明文字 */
.output-description {
    margin-top: 10px;
    padding: 12px;
    background: #f9f9f9;
    border-left: 3px solid #0073aa;
    border-radius: 4px;
}

.method-info p {
    font-size: 12px !important;
    color: #666 !important;
    margin: 5px 0 !important;
    line-height: 1.6;
}

.wechat-info {
    border-left-color: #00a32a;
}

.email-info {
    border-left-color: #0073aa;
}

/* API状态说明 */
.api-status p {
    font-size: 12px !important;
    color: #666 !important;
}

/* 通知说明文字 */
.notice p,
span.notice,
span.description {
    font-size: 12px !important;
    color: #666 !important;
}