/* XMLインポートダイアログのスタイル */

.xml-import-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.xml-import-overlay.visible {
    opacity: 1;
}

.xml-import-dialog {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.xml-import-overlay.visible .xml-import-dialog {
    transform: translateY(0);
}

.xml-import-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.xml-import-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.xml-import-body {
    padding: 24px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.import-section {
    transition: opacity 0.3s ease;
}

.import-section.hidden {
    display: none;
}

/* ファイル選択セクション */
.file-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.file-drop-zone.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-icon {
    color: #999;
    margin-bottom: 8px;
}

.drop-zone-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.drop-zone-subtext {
    font-size: 14px;
    color: #999;
    margin: 0;
}

.select-file-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.select-file-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.select-file-btn:active {
    transform: translateY(0);
}

.import-info {
    margin-top: 24px;
    padding: 16px;
    background: #f0f4ff;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
}

.import-info p {
    margin: 8px 0;
}

/* 進捗セクション */
.progress-container {
    margin-bottom: 24px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-header span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

#progressPercent {
    color: #667eea;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-stats {
    margin-top: 8px;
    font-size: 13px;
    color: #999;
    text-align: center;
}

.abort-btn {
    width: 100%;
    padding: 12px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.abort-btn:hover {
    background: #d32f2f;
}

.abort-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 結果セクション */
.result-container {
    text-align: center;
    padding: 24px 0;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

#resultTitle {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 24px 0;
}

.result-stats {
    margin: 24px 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 8px;
}

.stat-row.error {
    background: #ffebee;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.stat-row.error .stat-value {
    color: #f44336;
}

.error-message {
    padding: 16px;
    background: #ffebee;
    border-radius: 8px;
    color: #d32f2f;
    font-size: 14px;
    text-align: left;
}

.primary-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .xml-import-dialog {
        width: 95%;
        margin: 20px;
    }

    .xml-import-header {
        padding: 20px;
    }

    .xml-import-body {
        padding: 20px;
    }

    .file-drop-zone {
        padding: 32px 16px;
    }
}