/* Tools pages styles */

/* Page header */
.tools-header {
    background: linear-gradient(135deg, #217346 0%, #1a5c38 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 1.5rem;
}
.tools-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.tools-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Auto-fill toolbar */
.autofill-toolbar {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.autofill-toolbar .btn {
    font-size: 0.85rem;
}

/* Spreadsheet container override for tools */
#spreadsheet-container {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
#spreadsheet-container .trainer-grid-container {
    max-height: 450px;
    overflow: auto;
}

/* Formula check section */
.formula-check-section {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.formula-check-section .input-group {
    max-width: 100%;
}
.formula-check-section input.form-control {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1rem;
}

/* Result panel */
#formula-result-panel {
    display: none;
}
#formula-result-panel .alert {
    margin-bottom: 0;
}
#formula-result-panel .badge {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Formula visualizer styles */
.formula-formatted-output {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}
.formula-formatted-output pre {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Syntax highlighting for excelFormulaUtilities HTML output */
.formula-highlight .function {
    color: #217346;
    font-weight: 600;
}
.formula-highlight .function_start {
    color: #217346;
    font-weight: 600;
}
.formula-highlight .function_stop {
    color: #217346;
    font-weight: 600;
}
.formula-highlight .quote_mark {
    color: #0d6efd;
}
.formula-highlight .text {
    color: #0d6efd;
}
.formula-highlight .number {
    color: #d63384;
}
.formula-highlight .error {
    color: #dc3545;
    font-weight: 600;
}
.formula-highlight .operator {
    color: #6f42c1;
    font-weight: 600;
}
.formula-highlight .logical {
    color: #fd7e14;
    font-weight: 600;
}
.formula-highlight .range {
    color: #20c997;
}
.formula-highlight .tabbed {
    border-left: 1px dotted #adb5bd;
    padding-left: 0.5rem;
    margin-left: 0.25rem;
}

/* Example formulas */
.example-formulas .btn {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    margin: 0.2rem;
}

/* Visualizer input */
#formula-input {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1rem;
    min-height: 60px;
}

/* Token table */
#token-table .table {
    font-size: 0.85rem;
}
#token-table code {
    color: #217346;
}

/* Responsive */
@media (max-width: 768px) {
    .tools-header {
        padding: 1.5rem 0;
    }
    .tools-header h1 {
        font-size: 1.25rem;
    }
    .autofill-toolbar {
        flex-wrap: wrap !important;
    }
    .autofill-toolbar .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}
