/**
 * 錯誤收集器樣式
 */

/* 右鍵選單 */
.error-context-menu {
    position: fixed;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, #333);
    border-radius: 8px;
    padding: 4px;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    animation: fadeIn 0.2s ease;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    color: var(--text-primary, #e0e0e0);
    font-size: 14px;
}

.context-menu-item:hover {
    background-color: var(--hover-bg, #2a2a2a);
}

.context-menu-item .icon {
    width: 20px;
    text-align: center;
}

.context-menu-item .shortcut {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.6;
}

/* 錯誤對話框 */
.error-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.error-dialog-content {
    background: var(--bg-primary, #0f0f0f);
    border: 1px solid var(--border-color, #333);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.error-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #333);
}

.error-dialog-header h3 {
    margin: 0;
    color: var(--text-primary, #e0e0e0);
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #999);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--hover-bg, #2a2a2a);
    color: var(--text-primary, #e0e0e0);
}

.error-dialog-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary, #999);
    font-size: 13px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, #333);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-primary, #e0e0e0);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color, #3b82f6);
}

.form-group input[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    color: var(--text-primary, #e0e0e0);
    font-size: 14px;
    cursor: pointer;
}

.error-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color, #333);
}

.btn-cancel,
.btn-submit {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-cancel {
    background: var(--bg-secondary, #1a1a1a);
    color: var(--text-secondary, #999);
}

.btn-cancel:hover {
    background: var(--hover-bg, #2a2a2a);
    color: var(--text-primary, #e0e0e0);
}

.btn-submit {
    background: var(--accent-color, #3b82f6);
    color: white;
}

.btn-submit:hover {
    background: var(--accent-hover, #2563eb);
}

/* 通知提示 */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, #333);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 10002;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.error-notification.show {
    transform: translateX(0);
}

.error-notification.success {
    border-left: 3px solid #10b981;
}

.error-notification.error {
    border-left: 3px solid #ef4444;
}

.error-notification.warning {
    border-left: 3px solid #f59e0b;
}

.notification-icon {
    font-size: 18px;
}

.notification-message {
    color: var(--text-primary, #e0e0e0);
    font-size: 14px;
}

/* 選中文字高亮 */
.error-marked {
    background-color: rgba(239, 68, 68, 0.2);
    border-bottom: 2px dashed #ef4444;
    cursor: pointer;
}

.error-marked:hover {
    background-color: rgba(239, 68, 68, 0.3);
}

/* 動畫 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 響應式調整 */
@media (max-width: 640px) {
    .error-dialog-content {
        width: 95%;
        margin: 10px;
    }
    
    .error-notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    .error-notification.show {
        transform: translateY(0);
    }
}