/* AI二维码 - 适配 Twenty Twenty-Four 主题 */
/* 版本: 2.4.0 */

.aiqr-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.aiqr-container {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* 左侧表单 */
.aiqr-form {
    flex: 1;
    min-width: 300px;
}

.aiqr-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--wp--preset--color--contrast, #111);
}

.aiqr-desc {
    color: var(--wp--preset--color--contrast-2, #555);
    margin-bottom: 1.5rem;
}

/* Tabs */
.aiqr-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--wp--preset--color--accent-3, #eee);
    padding-bottom: 0;
}

.aiqr-tab {
    padding: 0.6rem 1.2rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--wp--preset--color--contrast-2, #555);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.aiqr-tab:hover {
    color: var(--wp--preset--color--contrast, #111);
}

.aiqr-tab.active {
    color: var(--wp--preset--color--primary, #0066cc);
    border-bottom-color: var(--wp--preset--color--primary, #0066cc);
    font-weight: 600;
}

/* Panels */
.aiqr-panel {
    display: none;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.aiqr-panel.active {
    display: flex;
}

.aiqr-panel input,
.aiqr-panel textarea,
.aiqr-panel select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--wp--preset--color--accent-3, #ddd);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--wp--preset--color--base, #fff);
    color: var(--wp--preset--color--contrast, #111);
    transition: border-color 0.2s;
}

.aiqr-panel input:focus,
.aiqr-panel textarea:focus,
.aiqr-panel select:focus {
    outline: none;
    border-color: var(--wp--preset--color--primary, #0066cc);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
}

.aiqr-panel textarea {
    resize: vertical;
    min-height: 100px;
}

/* 选项 */
.aiqr-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--wp--preset--color--accent-1, #f9f9f9);
    border-radius: 8px;
}

.aiqr-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--wp--preset--color--contrast-2, #555);
}

.aiqr-options input[type="color"] {
    width: 36px;
    height: 36px;
    border: 1px solid var(--wp--preset--color--accent-3, #ddd);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.aiqr-options select {
    padding: 0.4rem;
    border: 1px solid var(--wp--preset--color--accent-3, #ddd);
    border-radius: 4px;
    background: var(--wp--preset--color--base, #fff);
}

/* 生成按钮 */
.aiqr-generate {
    width: 100%;
    padding: 0.9rem;
    background: var(--wp--preset--color--primary, #0066cc);
    color: var(--wp--preset--color--base, #fff);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.aiqr-generate:hover {
    opacity: 0.9;
}

.aiqr-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 右侧预览 */
.aiqr-preview {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.aiqr-phone-mockup {
    display: none;
}

.aiqr-phone-screen {
    display: none;
}

#aiqr-qrcode {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: var(--wp--preset--color--base, #fff);
    border: 2px solid var(--wp--preset--color--accent-3, #eee);
    border-radius: 8px;
    min-width: 266px;
    min-height: 266px;
}

#aiqr-qrcode img {
    display: block;
    max-width: 256px;
    max-height: 256px;
    object-fit: contain;
    border-radius: 4px;
}

.aiqr-placeholder {
    text-align: center;
    color: var(--wp--preset--color--contrast-3, #999);
}

.aiqr-placeholder svg {
    margin-bottom: 0.5rem;
}

.aiqr-placeholder p {
    font-size: 0.9rem;
    margin: 0;
}

/* 下载按钮 */
.aiqr-actions {
    width: 100%;
    max-width: 280px;
}

.aiqr-download {
    width: 100%;
    padding: 0.7rem;
    background: var(--wp--preset--color--accent-1, #f0f0f0);
    color: var(--wp--preset--color--contrast, #333);
    border: 1px solid var(--wp--preset--color--accent-3, #ddd);
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.aiqr-download:hover {
    background: var(--wp--preset--color--accent-2, #e0e0e0);
}

/* 响应式 */
@media (max-width: 768px) {
    .aiqr-container {
        flex-direction: column;
    }

    .aiqr-preview {
        flex: 1 1 100%;
        width: 100%;
    }
}
