/**
 * OCR結果確認モーダルのスタイル
 */

/* モーダルコンテナ（非表示状態） */
.ocr-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

/* モーダル表示中 */
.ocr-result-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* オーバーレイ（背景） */
.ocr-result-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

/* モーダルコンテンツ */
.ocr-result-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 閉じるボタン */
.ocr-result-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10002;
    line-height: 1;
}

.ocr-result-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* モーダルヘッダー */
.ocr-result-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.ocr-result-modal-title {
    font-size: 24px;
    font-weight: bold;
    color: #111827;
    margin: 0 0 8px 0;
}

.ocr-result-modal-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* モーダルボディ */
.ocr-result-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    max-height: calc(90vh - 200px);
}

/* テーブル */
.ocr-result-table {
    width: 100%;
    border-collapse: collapse;
}

.ocr-result-table thead {
    background-color: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.ocr-result-table th {
    padding: 12px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.ocr-result-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.ocr-result-item:hover {
    background-color: #f9fafb;
}

/* チェックボックス */
.ocr-result-checkbox {
    text-align: center;
}

.ocr-result-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* 商品名入力 */
.ocr-result-name {
    width: 100%;
}

.ocr-result-name input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.ocr-result-name input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 価格入力 */
.ocr-result-price {
    text-align: right;
}

.ocr-result-price input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    text-align: right;
    transition: border-color 0.2s;
    min-width: 100px;
}

.ocr-result-price input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ジャンル選択 */
.ocr-result-genre {
    width: 100%;
}

.ocr-result-genre select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s;
    min-width: 130px;
}

.ocr-result-genre select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ocr-result-genre select:hover {
    border-color: #9ca3af;
}

/* モーダルフッター */
.ocr-result-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: #f9fafb;
}

/* ボタン */
.btn-secondary {
    padding: 10px 20px;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-primary {
    padding: 10px 20px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .ocr-result-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .ocr-result-modal-header {
        padding: 16px;
    }

    .ocr-result-modal-body {
        padding: 16px;
    }

    .ocr-result-modal-footer {
        padding: 16px;
        flex-direction: column;
    }

    .ocr-result-modal-footer button {
        width: 100%;
    }

    .ocr-result-table {
        font-size: 12px;
    }

    .ocr-result-table th,
    .ocr-result-table td {
        padding: 8px;
    }
}

