
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}
.container {
    width: 8.5in;
    margin: 0 auto;
    padding: 0.5in;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.ticket-header { text-align: center; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 2px solid #ccc; }
.ticket-title { font-size: 20px; font-weight: bold; margin-bottom: 5px; }
.program-info { display: flex; justify-content: space-between; margin-bottom: 5px; }
.student-name-input { padding: 6px; border: 1px solid #ccc; border-radius: 4px; font-size: 12px; margin-left: 8px; width: 180px; }
.student-name-print, .project-name-print { display: none; margin-left: 8px; }
#gcode-editor { width: 100%; height: 3in; padding: 8px; border: 1px solid #ccc; border-radius: 4px; font-family: monospace; resize: vertical; font-size: 12px; box-sizing: border-box; line-height: 1.4; margin-bottom: 0px; }
.gcode-summary { font-family: monospace; font-size: 12px; margin-bottom: 10px; display: none; }
.header-with-buttons { margin-bottom: 10px; }
.reference-buttons { display: flex; gap: 5px; }
.ref-button { padding: 6px 12px; background-color: #f0f0f0; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: bold; }
.ref-button.active { background-color: #0066cc; color: white; border-color: #0066cc; font-weight: bold; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.reference-table, .tool-list-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.reference-table th, .reference-table td, .tool-list-table th, .tool-list-table td { border: 1px solid #ccc; padding: 6px; text-align: left; }
.reference-table th, .tool-list-table th { background-color: #f0f0f0; font-weight: bold; }
.code-example {
    font-family: monospace;
    font-size: 1.1em;
    color: #0066cc;
}
.section-header {
    background-color: #e6e6e6;
    font-weight: bold;
    text-align: center;
}
h3 { margin-top: 24px; margin-bottom: 8px; font-size: 16px; font-weight: bold; border-bottom: 2px solid #333; padding-bottom: 3px; }
.error-category { background-color: #d32f2f; color: white; padding: 6px; margin: 8px 0 6px; font-size: 12px; font-weight: bold; border-radius: 4px; }
#error-counter.success { background-color: #4CAF50; color: white; padding: 10px; font-size: 14px; font-weight: bold; text-align: center; border-radius: 4px; margin-bottom: 10px; }
.validation-error { color: #d32f2f; font-size: 12px; }
.print-button { padding: 8px 12px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; margin: 8px auto 0; display: block; font-weight: bold; }
.print-button.error { background-color: #cccccc; color: white; cursor: not-allowed; }
.print-button.warning { background-color: #F57C00; color: white; }
.print-button.no-errors { background-color: #4CAF50; color: white; }
.print-button.warning:hover:not(:disabled) { background-color: #E64A19; }
.print-button.no-errors:hover:not(:disabled) { background-color: #45a049; }
.download-button { padding: 8px 12px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; margin: 8px auto 0; display: block; font-weight: bold; }
.download-button.error { background-color: #d32f2f; color: white; }
.download-button.warning { background-color: #F57C00; color: white; }
.download-button.no-errors { background-color: #4CAF50; color: white; }
.download-button.error:hover { background-color: #b71c1c; }
.download-button.warning:hover { background-color: #E64A19; }
.download-button.no-errors:hover { background-color: #45a049; }
.fix-button { margin-left: 8px; padding: 4px 8px; background-color: #0066cc; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 10px; }
.fix-button:hover { background-color: #1976D2; }
.tools-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.tools-table th, .tools-table td { border: 1px solid #ccc; padding: 6px; text-align: left; font-size: 12px; }
.tools-table th { background-color: #f0f0f0; font-weight: bold; }
.tools-table td.error { background-color: #ffcccc; }
.xy-bounds-table { width: 50%; border-collapse: collapse; font-size: 12px; float: left; }
.xy-bounds-table th, .xy-bounds-table td { border: 1px solid #ccc; padding: 4px; text-align: left; }
.xy-bounds-table th { background-color: #f0f0f0; font-weight: bold; }
.xy-bounds-content { overflow: hidden; }
.xy-diagram { 
    width: 45%; 
    float: right; 
    position: relative; 
    margin: 0;
    background-color: #ffffff;
    min-height: 120px;
    overflow: hidden;
    margin: inherit;
}
.xy-datum { position: absolute; width: 4px; height: 4px; background-color: red; border-radius: 50%; }
.print-feedback { list-style: none; padding: 0; font-size: 16px; text-align: left; margin: 12px 0; width: 300px; }
.print-feedback li { color: #d32f2f; position: relative; padding-left: 28px; margin-bottom: 8px; line-height: 1.4; }
.print-feedback li.completed { color: #4CAF50; }
.print-feedback li.warning { color: #F57C00; }
.print-feedback svg { position: absolute; left: 0; width: 20px; height: 20px; }
.print-only { display: none; }
.print-only-not { display: block; }
.signature-line { margin: 8px 0 10px; }
.checklist ul { list-style: none; padding-left: 20px; margin: 8px 0; }
.rubric table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.rubric th, .rubric td { border: 1px solid #ccc; padding: 4px; text-align: left; font-size: 12px; }
.rubric th { background-color: #f0f0f0; }
.material-inputs-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
}
.material-inputs {
    width: 40%;
    margin-bottom: 0;
}
.material-input-row {
    margin-bottom: 0px;
}
.material-inputs label {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}
.material-inputs input, .material-inputs select {
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    width: 80%;
    max-width: 180px;
}
.xy-diagram {
    width: 45%;
    position: relative;
    margin: 0;
    background-color: #ffffff;
    min-height: 120px;
    overflow: hidden;
}
.xy-bounds-table {
    display: none; 
}
.bounds-errors-section {
    margin-top: 10px;
}
#bounds-error-counter.success {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px;
    margin-bottom: 10px;
}
.bounds-error-category {
    background-color: #F57C00;
    color: white;
    padding: 6px;
    margin: 8px 0 6px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
}
.bounds-error {
    color: #F57C00;
    font-size: 12px;
}
.material-print {
    display: none;
}

.checklist-container {
    margin-bottom: 10px;
}

span.right {
    width: 60%;
    text-align: right;
    padding: 5px;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 10px; /* Space from Tool List button */
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 20px;
    background-color: #F57C00; /* Orange for Quick Check (unchecked) */
    border-radius: 20px;
    transition: background-color 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    top: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

input:checked + .slider {
    background-color: #4CAF50; /* Green for Strict Check (checked) */
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 12px;
    margin-right: 8px; /* Space between label and slider */
    color: #000000;
    font-weight: bold;
}

input:checked ~ .toggle-label {
    color: #4CAF50; /* Green for Strict Check (checked) */
}

.check-mode-badge {
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
    background-color: #4CAF50; /* Green for STRICT (default, checked) */
    margin-left: 8px;
    vertical-align: top;
    transition: background-color 0.3s; /* Smooth color transition */
}

@media print {
    .check-mode-badge { color: #000 !important; }
    body { margin: 0; padding: 0; background-color: white; color: #000 !important; }
    .container { width: 100%; padding: 0.25in; box-shadow: none; }
    #gcode-editor { display: none; }
    #gcode-summary { display: block; }
    #error-counter.success { display: none; }
    #bounds-error-counter.success { display: none; }
    .tools-table { width: 7in; font-size: 10px; }
    .tools-table th, .tools-table td { padding: 3px; color: #000 !important; }
    .tools-table .unknown-tool-input { display: none; }
    .student-name-input, .project-name-input { display: none; }
    .student-name-print, .project-name-print { display: inline; }
    .program-info { 
        display: flex; 
        justify-content: space-between;
        margin-bottom: 12px; 
        padding-right: 20px;
        margin-right: 20px;
        width: 100%; 
    }
    .program-info div:first-child {
        width: auto;
        margin-right: 40px;
        text-align: right;
    }
    .program-info div:last-child {
        width: auto;
        text-align: left;
        margin-right: 20px;
        padding-right: 20px;
    }
    .validation-section { margin-top: 12px; }
    .validation-section h3 { margin-bottom: 4px; }
    #validation-details-grouped { font-size: 10px; line-height: 1.2; text-align: left; font-weight: normal; color: #000 !important; }
    #validation-details-grouped .error-category,
    #bounds-details-grouped .bounds-error-category {
        background-color: #000000 !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    #xy-diagram {
        margin: 0; /* Adjust to your default screen margin */
        background-color: #ffffff;
        position: relative;
        overflow: hidden;
        border: none;
    }
    .reference-buttons, .reference-table, .tool-list-table { display: none; }
    .print-button, .fix-button, .download-button { display: none; }
    .print-feedback li, .print-feedback li.completed { color: #000 !important; }
    .print-feedback svg { display: none; }
    .print-only { display: block; }
    .print-only-not { display: none; }
    h3 { font-size: 14px; margin: 12px 0 8px; color: #000 !important; }
    p { font-size: 12px; margin: 8px 0; color: #000 !important; }
    .ticket-header { margin-bottom: 12px; padding-bottom: 6px; }
    .validation-error { font-size: 10px; color: #000000 !important; }
    .bounds-error { font-size: 10px; color: #000000 !important; }
    .print-feedback { font-size: 12px; }
    .print-feedback li { padding-left: 20px; margin-bottom: 6px; }
    .signature-line { margin: 10px 0 12px; font-size: 12px; color: #000 !important; }
    #diagram-section {
        margin: 0 !important;
        padding: 0 !important;
    }
    .xy-diagram {
        margin: 0 !important; /* Remove vertical margins */
        padding: 0 !important; /* Remove padding */
        height: auto !important; /* Shrink to content height */
        width: auto !important; /* Optional: adjust width if needed */
        background-color: #ffffff !important;
        position: static !important;
        overflow: visible !important;
    }
    .xy-diagram svg {
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important; /* Fit SVG to its content */
        width: auto !important; /* Optional: adjust width if needed */
        display: block !important; /* Remove inline spacing */
    }
    .xy-diagram svg rect[fill="rgba(0,192,0,0.2)"] {
        fill: rgba(0,0,0,0.1) !important;
        stroke: none !important;
    }
    .xy-diagram svg rect[fill="rgba(245,124,0,0.4)"] {
        fill: rgba(0,0,0,0.4) !important;
        stroke: none !important;
    }
    .xy-bounds-section {
        page-break-inside: avoid !important;
        overflow: visible !important;
    }
    .xy-bounds-content, .xy-diagram {
        overflow: visible !important;
        page-break-inside: avoid;
    }
    .xy-diagram svg #datum-symbol circle,
    .xy-diagram svg #datum-symbol path {
        stroke: #000 !important;
        fill-opacity: 1 !important;
        stroke-width: 1 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    .material-inputs-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        width: 100% !important;
        page-break-inside: avoid !important;
    }
    .material-inputs {
        width: 45% !important;
        margin-right: 10px !important;
    }
    .material-inputs select, 
    .material-inputs input { 
        display: none; 
    }
    .material-print { 
        display: inline;
        margin-left: 8px;
    }
    .material-inputs label {
        display: inline-block;
        margin-right: 15px;
    }
    /* Adjusted checklist and signature styles */
    .checklist-container {
        margin-bottom: 10px;
    }
    .checklist ul {
        margin: 0;
        padding-left: 20px;
    }
    .checklist li {
        margin-bottom: 6px;
    }
    .checklist li:last-child {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
    }
    .checklist-item {
        display: inline-flex; /* Keep checkbox and text together */
        align-items: center; /* Align checkbox and text vertically */
    }
    .signature-line {
        margin: 0;
        font-size: 12px; /* Match checklist font-size */
        color: #000 !important;
        white-space: nowrap;
    }
}
