/* ========== TVP邀请函生成器样式 ========== */
.tvp-invitation-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 100px);
    overflow: hidden;
}

/* 语言切换控件 */
.language-toggle {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.language-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s;
    flex: 1;
    justify-content: center;
}

.language-option:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.language-option input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.language-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #007bff;
}

.language-option:has(input[type="radio"]:checked) {
    border-color: #007bff;
    background-color: #e7f3ff;
}

.language-option span {
    font-size: 14px;
    color: #333;
    user-select: none;
}

/* 左侧配置区 */
.tvp-invitation-controls {
    width: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tvp-invitation-controls h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.tvp-invitation-controls .form-section {
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.tvp-invitation-controls .form-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #555;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.form-group .required {
    color: #dc3545;
    margin-left: 4px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
    box-sizing: border-box;
    line-height: 1.6;
}

.form-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.file-status {
    margin-top: 8px;
    color: #28a745;
    font-size: 14px;
}

.hint-text {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.config-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.config-item {
    flex: 1;
}

.config-item label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #555;
}

.form-input-small {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.form-input-small:focus {
    outline: none;
    border-color: #007bff;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.button-group .btn {
    flex: 1;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
    border: 1px solid #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
}

/* 右侧预览区 */
.tvp-invitation-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.preview-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.preview-wrapper {
    flex: 1;
    overflow: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.preview-wrapper canvas {
    display: block;
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.preview-info {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hint-text {
    margin: 0;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .tvp-invitation-container {
        flex-direction: column;
    }
    
    .tvp-invitation-controls {
        width: 100%;
        max-height: 500px;
    }
    
    .tvp-invitation-preview {
        height: 600px;
    }
}

@media (max-width: 768px) {
    .tvp-invitation-controls {
        padding: 15px;
    }
    
    .tvp-invitation-controls .form-section {
        padding: 15px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        width: 100%;
    }
    
    .config-row {
        flex-direction: column;
    }
}
