.result-text {
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 3px;
    background-color: #f8f8f8;
    overflow-x: auto;
    width: 100%;
    min-height: 600px;
    height: calc(100% - 80px);
    resize: vertical;
    box-sizing: border-box;
}@media (max-width: 1200px) {
    .result-container {
        flex-direction: column;
        min-height: auto;
    }
    
    .result,
    .pdf-preview {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 500px;
        margin-bottom: 20px;
    }
    
    .result-text {
        height: 500px;
    }
    
    .excel-table {
        max-height: 500px;
    }
}/* styles.css - 見積書PDF解析システム用スタイルシート */

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
}

.container {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #27ae60;
}

.btn-secondary:hover {
    background-color: #219955;
}

.btn-excel {
    background-color: #2e7d32;
}

.btn-excel:hover {
    background-color: #226a29;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.alert-danger {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

.result-container {
    display: flex;
    margin-top: 30px;
    gap: 20px;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 800px;
    flex-wrap: nowrap; /* 折り返しを禁止 */
    width: 100%; /* 幅を100%に設定 */
}

.pdf-preview,
.result {
    flex: 0 0 48%; /* flex-grow: 0, flex-shrink: 0, flex-basis: 48% */
    background-color: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-y: auto;
    box-sizing: border-box;
    height: 800px;
    max-width: 48%;
    display: block; /* インライン要素ではなくブロック要素として表示 */
}

.pdf-frame {
    flex: 1;
    width: 100%;
    height: 700px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
}

.image-preview {
    width: 100%;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    text-align: center;
    overflow: auto;
    flex: 1; /* 残りのスペースを取得 */
    min-height: 600px; /* 最小高さを設定 */
}
.image-preview img{
    width: 100%;
    object-fit: contain; /* 画像のアスペクト比を維持 */
    height: auto;
    max-height: 100%;
}
.preview-image {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.pdf-controls {
    margin-bottom: 10px;
}

.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px;
    background-color: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.page-indicator {
    font-weight: bold;
    padding: 0 10px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
    margin-bottom: 8px;
}

.excel-view {
    width: 100%;
    overflow-x: auto;
    margin-top: 15px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 3px;
    background-color: #f8f8f8;
}

.editable {
    font-size: 14px;
    line-height: 1.5;
}

.result-actions {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.copy-status {
    margin-left: 10px;
    color: #27ae60;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-status.visible {
    opacity: 1;
}

.loading {
    text-align: center;
    display: none;
    margin-top: 20px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #3498db;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.debug-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.pdf-debug {
    font-size: 10px;
    margin-top: 10px;
    padding: 5px;
    background-color: #f8f9fa;
    opacity: 0.8;
}

.api-debug {
    margin-top: 30px;
    margin-bottom: 30px;
    border-top: 1px dashed #ccc;
    clear: both;
}

.debug-info pre {
    margin: 0;
    white-space: pre-wrap;
    font-size: 12px;
    overflow-x: auto;
}

/* エクセルライクなテーブルスタイル */
.excel-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    margin-top: 15px;
    background-color: white;
}

.excel-table th {
    background-color: #f0f0f0;
    border: 1px solid #d0d0d0;
    padding: 8px;
    font-weight: bold;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.excel-table td {
    border: 1px solid #d0d0d0;
    padding: 6px;
    vertical-align: top;
    white-space: pre-wrap;
    background-color: white;
}

.excel-table td[contenteditable] {
    padding: 6px;
    min-height: 20px;
    outline: none;
}

.excel-table td[contenteditable]:focus {
    background-color: #e6f7ff;
    box-shadow: inset 0 0 0 2px #1a73e8;
}

.excel-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.excel-table tr:hover {
    background-color: #f0f7ff;
}

/* 特定の列のスタイル */
.excel-table .col-item-name {
    min-width: 250px;
    max-width: 400px;
}

.excel-table .col-price {
    min-width: 80px;
    text-align: right;
}

.excel-table .col-quantity {
    min-width: 60px;
    text-align: right;
}

.excel-table .col-amount {
    min-width: 100px;
    text-align: right;
}

.excel-table .col-note {
    min-width: 150px;
}

.excel-table .col-verify {
    min-width: 80px;
    text-align: center;
}

.verify-ok {
    color: #2e7d32;
    font-weight: bold;
}

.verify-ng {
    color: #c62828;
    font-weight: bold;
}