/**
 * DVTV 書類プロセッサー フロントエンドCSS
 */

.dvtv-sp-form-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.dvtv-sp-form-wrap h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    color: #0073aa;
}

.dvtv-sp-form-wrap h4 {
    color: #333;
    margin-bottom: 15px;
}

/* OCRセクション */
.dvtv-sp-ocr-section {
    background: #e8f4fc;
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.dvtv-sp-ocr-section h4 {
    margin-top: 0;
    color: #0066cc;
}

.dvtv-sp-ocr-section input[type="file"] {
    margin-right: 10px;
    padding: 10px;
    border: 1px dashed #0073aa;
    border-radius: 4px;
    background: #fff;
}

#dvtv-sp-ocr-status {
    margin-top: 15px;
}

/* フォームセクション */
#dvtv-sp-form-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

/* フォーム */
.dvtv-sp-form {
    margin-top: 15px;
}

.dvtv-sp-field {
    margin-bottom: 20px;
}

.dvtv-sp-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.dvtv-sp-field .required {
    color: #d63638;
}

.dvtv-sp-field input[type="text"],
.dvtv-sp-field input[type="number"],
.dvtv-sp-field input[type="date"],
.dvtv-sp-field select,
.dvtv-sp-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.dvtv-sp-field input:focus,
.dvtv-sp-field select:focus,
.dvtv-sp-field textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* OCRで入力されたフィールド */
.dvtv-sp-ocr-filled {
    background-color: #fffde7 !important;
    border-color: #ffc107 !important;
}

/* 2カラム */
.dvtv-sp-row {
    display: flex;
    gap: 20px;
}

.dvtv-sp-row .dvtv-sp-field {
    flex: 1;
}

/* アクションボタン */
.dvtv-sp-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.dvtv-sp-actions .button {
    padding: 10px 30px;
    font-size: 14px;
}

/* 重複チェック結果 */
.dvtv-sp-duplicate-result {
    margin-top: 20px;
}

.dvtv-sp-duplicate-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    color: #856404;
}

.dvtv-sp-duplicate-warning strong {
    font-size: 16px;
}

.dvtv-sp-duplicate-warning ul {
    margin: 10px 0;
    padding-left: 20px;
}

.dvtv-sp-duplicate-warning li {
    margin-bottom: 8px;
}

.dvtv-sp-duplicate-warning a {
    color: #0066cc;
}

.dvtv-sp-duplicate-ok {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    color: #155724;
}

/* メッセージ */
.dvtv-sp-message {
    margin-top: 20px;
}

.dvtv-sp-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    color: #155724;
}

.dvtv-sp-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px;
    color: #721c24;
}

/* 提出先ユーザー設定ページ */
.dvtv-sp-submit-users-wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.dvtv-sp-submit-users-wrap h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    color: #0073aa;
}

.dvtv-sp-users-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    background: #fff;
}

.dvtv-sp-user-item {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.dvtv-sp-user-item:last-child {
    border-bottom: none;
}

.dvtv-sp-user-item:hover {
    background: #f5f5f5;
}

.dvtv-sp-user-item input[type="checkbox"] {
    margin-right: 10px;
}

/* レスポンシブ */
@media (max-width: 600px) {
    .dvtv-sp-row {
        flex-direction: column;
        gap: 0;
    }
    
    .dvtv-sp-actions {
        flex-direction: column;
    }
    
    .dvtv-sp-actions .button {
        width: 100%;
    }
}
