/* Tool-specific styles only - base styles are in tool-layout.css */

.tool-interface {
    margin-top: 60px;
}

.table-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-controls .btn-secondary {
    padding: 8px 16px;
    font-size: 14px;
}

.import-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-upload-zone {
    background: #0a0a0a;
    border: 2px dashed #374151;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.file-upload-zone svg {
    color: #6b7280;
    margin-bottom: 12px;
}

.file-upload-zone p {
    color: #9ca3af;
    margin: 0;
    font-size: 14px;
}

.import-note {
    font-size: 13px;
    color: #6b7280;
}

.editor-section {
    margin-top: 24px;
}

.editor-hint {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.table-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.table-container {
    overflow-x: auto;
    background: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.visual-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 400px;
}

.visual-table th,
.visual-table td {
    border: 1px solid #374151;
    padding: 0;
    min-width: 100px;
}

.visual-table th {
    background: #1a1a1a;
}

.visual-table td {
    background: #141414;
}

.visual-table input {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.visual-table input:focus {
    outline: none;
    background: #1a1a1a;
}

.visual-table th input {
    font-weight: 600;
}

.alignment-controls {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding-bottom: 4px;
}

.alignment-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    flex: 1;
}

.alignment-label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.alignment-buttons {
    display: flex;
    gap: 2px;
    background: #1a1a1a;
    border-radius: 6px;
    padding: 2px;
}

.alignment-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #9ca3af;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

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

.alignment-btn.active {
    background: #3b82f6;
    color: #ffffff;
}

.alignment-btn svg {
    width: 14px;
    height: 14px;
}

.output-section {
    margin-top: 32px;
}

.export-controls {
    margin-bottom: 24px;
}

.export-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.code-preview {
    background: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #1a1a1a;
    border-bottom: 1px solid #374151;
}

.code-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.btn-icon {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

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

.code-container {
    padding: 16px;
    overflow-x: auto;
}

.code-container pre {
    margin: 0;
}

.code-container code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #d1d5db;
    white-space: pre;
}

.preview-section {
    background: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    overflow: hidden;
}

.preview-section h4 {
    margin: 0;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    background: #1a1a1a;
    border-bottom: 1px solid #374151;
}

.preview-container {
    padding: 24px;
    overflow-x: auto;
}

#livePreview table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
}

#livePreview th,
#livePreview td {
    border: 1px solid #374151;
    padding: 10px 14px;
}

#livePreview th {
    background: #1a1a1a;
    font-weight: 600;
    color: #e5e7eb;
}

#livePreview td {
    background: #141414;
    color: #d1d5db;
}

#livePreview .align-left {
    text-align: left;
}

#livePreview .align-center {
    text-align: center;
}

#livePreview .align-right {
    text-align: right;
}

.empty-preview {
    color: #6b7280;
    text-align: center;
    padding: 32px;
    font-size: 14px;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 12px 20px;
    color: #e5e7eb;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: #059669;
}

.toast.error {
    border-color: #dc2626;
}

@media (max-width: 768px) {
    .table-controls {
        flex-direction: column;
    }
    
    .table-controls .btn-secondary {
        width: 100%;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .export-buttons button {
        width: 100%;
    }
    
    .file-upload-zone {
        padding: 24px 16px;
    }
    
    .alignment-group {
        min-width: 80px;
    }
}