/* CSS 变量定义 */
:root {
    --original-width: 45%;
    --translate-button-width: 60px;
}

/* Thinking 显示样式 */
.translation-thinking-display {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 8px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-left: 3px solid #dee2e6;
    border-radius: 4px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 150px;
    overflow-y: auto;
}

/* 按钮全宽样式 */
.btn-full-width {
    width: 100%;
    margin-bottom: 10px;
}

.setting-hint {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* 按钮样式 */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: #0366d6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #0256c7;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #586069;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #484e54;
}

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

.file-info {
    font-size: 12px;
    color: #666;
}

.column-labels {
    display: flex;
    width: 100%;
    position: relative;
}

.original-label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
    width: var(--original-width, 45%);
    padding-left: 5px;
}

.translation-label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
    position: absolute;
    right: 0;
    padding-right: 5px;
}

.vertical-container {
    flex: 1;
    padding: 40px 20px 20px;
    overflow-y: auto;
    background: #fff;
}

.placeholder {
    text-align: center;
    color: #999;
    margin-top: 50px;
}

/* 文本块样式 - 新的并排布局 */
.text-block-pair {
    margin-bottom: 20px;
    display: flex;
    align-items: stretch;
    min-height: 80px;
    gap: 0;
}

.original-block,
.translation-block {
    position: relative;
}

.original-block {
    width: var(--original-width, 45%);
    padding: 35px 15px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px 0 0 4px;
    background: #fafafa;
    transition: all 0.3s;
}

.translation-block {
    flex: 1;
    padding: 35px 15px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 0 4px 4px 0;
    background: #fff;
    min-height: 60px;
    transition: all 0.3s;
}

/* 渲染切换图标 */
.translation-render-toggle {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.translation-render-toggle:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: scale(1.1);
}

/* 内容容器 */
.translation-content-markdown,
.translation-content-mathjax {
    width: 100%;
    min-height: 40px;
    color: #000;
}

.translation-content-markdown {
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    font-family: inherit;
    box-sizing: border-box;
}

.translation-content-mathjax {
    white-space: pre-wrap;
}

.translation-content-markdown:focus,
.translation-content-mathjax[contenteditable="true"]:focus {
    outline: none;
    border-color: #3498db;
}

.translate-button {
    width: 60px;
    height: auto;
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.translate-button:hover:not(:disabled) {
    background: #2980b9;
}

.translate-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.original-block:hover,
.translation-block:hover {
    border-color: #3498db;
}

.original-block.editable {
    cursor: text;
}

.original-block.editing,
.translation-block.editing {
    background: #fff;
    border-color: #3498db;
}

.original-block textarea,
.translation-block textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.original-block[contenteditable="true"],
.translation-block[contenteditable="true"] {
    outline: none;
}

.original-block[contenteditable="true"]:focus,
.translation-block[contenteditable="true"]:focus {
    background: #fff;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}


/* 加载动画 */
.translation-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}
