body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    padding-bottom: 50px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    padding-bottom: 20px;
}

.container h1 {
    text-align: center;
}

.container h2 {
    text-align: center;
}

.container h3 {
    text-align: center;
}

.container h4 {
    text-align: center;
    font-size: 1rem;
    /* Smaller font size for sub-item headings */
    margin-top: 10px;
    /* Add spacing above sub-item headings */
    font-weight: bold;
    /* Keep the text bold for consistency */
}

.container p {
    margin: 0 auto;
    text-align: center;
}

.menu {
    position: fixed;
    bottom: 60px;
    /* Adjusted to be above the menu button */
    left: 20px;
    background-color: #0078d7;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    /* Initially hidden */
    max-height: calc(100vh - 80px);
    /* Ensure it doesn't overflow beyond the button */
    overflow-y: auto;
    /* Add scrolling if the content exceeds the height */
}

.menu a {
    display: block;
    color: white;
    margin: 10px 0;
    text-decoration: none;
    font-weight: bold;
}

.menu a:hover {
    text-decoration: underline;
}

.menu-toggle {
    position: fixed;
    bottom: 20px;
    /* Position the button at the bottom-left corner */
    left: 20px;
    background-color: #0078d7;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

.menu-toggle:hover {
    background-color: #005a9e;
}



.btn {
    position: fixed;
    right: 20px;
    background-color: #0078d7;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.btn:hover {
    background-color: #005a9e;
}

.btn-return-top {
    bottom: 20px;
}

.btn-print {
    bottom: 60px;
}

section {
    margin-top: 10px;
    padding: 5px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

h2 {
    page-break-after: avoid;
    /* Ensure headings don't separate from their content */
}

ul {
    list-style: none;
    padding: 0;
}

li {
    margin-bottom: 10px;
    padding: 5px;
    border: 1px solid #e0e0e0;
    border-left: 4px solid transparent;
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.status-options {
    margin-top: 5px;
    display: flex;
    gap: 15px;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.status-options label {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    cursor: pointer;
}

.status-options input[type="checkbox"] {
    margin-right: 5px;
}

textarea.expandable-text {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    resize: none;
    margin-top: 5px;
    padding: 5px;
    font-size: 14px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    box-sizing: border-box;
    transition: height 0.2s ease;
}

textarea.expandable-text:focus {
    outline: none;
    border-color: #0078d7;
}

.stats {
    margin: 20px 0;
    text-align: center;
    page-break-inside: avoid !important;
}

.progress-summary {
    margin-bottom: 15px;
    page-break-inside: avoid !important;
}

.progress-percentage {
    margin: 10px 0;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
}

.chart-wrapper {
    display: flex;
    justify-content: center;
    /* Center align the chart */
    align-items: center;
    /* Vertically center the chart */
    height: 400px;
    /* Ensure sufficient height for the chart and legend */
}

canvas {
    max-width: 100%;
    /* Make the chart responsive */
    height: auto;
    /* Adjust height dynamically */
}

.chart-legend {
    margin-left: -50px;
    /* Bring the legend closer to the chart */
}

.clear-file-btn {
    background: none;
    color: #0078d7;
    /* Blue text like a link */
    border: none;
    padding: 0;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.clear-file-btn:hover {
    text-decoration: none;
}

.reference {
    font-style: italic;
    color: #0078d4;
    /* Example color for emphasis */
    margin-top: 8px;
}

.reference a {
    text-decoration: none;
    color: #005a9e;
    /* Link color */
}

.reference a:hover {
    text-decoration: underline;
}


.progress-bar {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
    height: 20px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #4caf50;
    text-align: center;
    line-height: 20px;
    color: white;
    font-weight: bold;
    transition: width 0.3s ease;
}

.chart-container {
    display: flex;
    justify-content: space-between;
    page-break-before: avoid !important;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
    margin-top: 20px;
}

.chart-item {
    flex: 0 0 45%;
    page-break-inside: avoid !important;
}

.chart-container.no-page-break {
    page-break-after: none;
}

/* File Upload Section */
.file-upload {
    margin-top: 5px;
}

/* File Display Container */
.file-display {
    margin-top: 10px;
    padding: 5px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    background-color: #f4f4f4;
    word-wrap: break-word;
    max-width: 100%;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Add Evidence title */
.file-display:not(:empty)::before {
    content: "Evidence:";
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

/* Image Display Styling */
.file-display img {
    max-width: 100%;
    max-height: 300px;
    /* Prevent overly tall images */
    margin: 5px auto;
    display: block;
    border-radius: 3px;
    page-break-inside: avoid;
}

/* Text File Display Styling */
.file-display pre {
    white-space: pre-wrap;
    /* Preserve line breaks */
    word-wrap: break-word;
    /* Wrap long words */
    font-family: 'Courier New', Courier, monospace;
    /* Use monospace for clarity */
    font-size: 14px;
    color: #333;
    /* Ensure good contrast */
    margin: 0;
    overflow-x: auto;
    /* Add horizontal scrolling for wide text */
}

.reference-button {
    position: fixed;
    bottom: 60px;
    /* Positioned below the menu toggle button */
    left: 20px;
    background-color: #0078d7;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.export-button {
    position: fixed;
    top: 10px;
    /* Position at the top */
    left: 10px;
    background-color: #0078d7;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

.import-button {
    position: fixed;
    top: 10px;
    /* Position at the top */
    right: 20px;
    /* Align to the right */
    background-color: #0078d7;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

.export-button:hover,
.import-button:hover {
    background-color: #005a9e;
}

#resetButton {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f8f9fa;
    /* Light background to make it discreet */
    border: 1px solid #ccc;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    color: #333;
    z-index: 1000;
    /* Ensure it stays on top */
}

#resetButton:hover {
    background-color: #e0e0e0;
    /* Slightly darker on hover */
}


@media print {
    .menu-toggle,
    .menu,
    .btn,
    .reference-button,
    .reference,
    .import-button,
    .export-button,
    #resetButton,
    .clear-file-btn,
    input {
        display: none;
    }

    .file-upload,
    p.file-upload {
        display: none !important;
    }

    .file-display:empty {
        display: none;
    }

    body {
        background-color: white;
    }

    /* Target every section and its containers */
    section,
    #privileged-access,
    #endpoint-security,
    .container > section {
        margin: 0 !important;
        padding: 1px !important;
        page-break-inside: avoid !important;
        /*page-break-after: auto !important;*/
        border: none !important;
        display: block !important;
    }

    /* Target specific sections that have gaps */
    #privileged-access,
    #endpoint-security {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    section + section {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    section:after {
        content: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
    }

    .container > * {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    section > h2,
    section > h2 + p {
        display: inline-block !important;
        page-break-inside: avoid !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    section > h2 + p {
        display: block !important;
    }

    ul {
        margin: 0 !important;
        padding: 0 !important;
    }

    ul li:last-child {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    h2, h3, h4 {
        margin: 1px 0 !important;
        padding: 0 !important;
        page-break-after: avoid !important;
    }

    h3 strong, h4 {
        page-break-after: avoid !important;
    }

    h3 + p, h4 + p {
        page-break-before: avoid !important;
        margin: 0 !important;
    }

    li {
        margin: 1px 0 !important;
        padding: 1px !important;
    }

    li:last-child {
        margin-bottom: 0 !important;
    }

    li h3, li h4 {
        page-break-before: avoid !important;
    }

    .file-display {
        margin: 0 !important;
        padding: 1px !important;
    }

    .file-display img {
        max-height: 200px !important;
        width: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
        padding: 0 !important;
    }

    #auditor-summary {
        page-break-after: avoid !important;
    }

    .status-box{width: auto !important;}
    
    textarea.expandable-text {
        height: fit-content;
        min-height: fit-content;
        margin: 1px 0 !important;
    }

    #azure-advisor-recommendations {
        page-break-before: always !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .severity-high { background-color: #FFB6C1 !important; }
    .severity-medium { background-color: #FFE4B5 !important; }
    .severity-low { background-color: #E0FFFF !important; }

    #recommendationsTable tr {
        page-break-inside: avoid !important;
    }

    .status-options input[type="checkbox"] {
        display: auto !important;
    }

    li p em {
        display: none !important;
    }

    li p {
        font-size: 0.6em !important;
        color: #666 !important;
        margin: 1px 0 !important;
        line-height: 1.2 !important;
    }
}

#subscription-list-container {
    margin: 20px 0;
}

.subscription-list {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subscription-list h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
    text-align: left;
}

.subscription-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.subscription-list li {
    background-color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin: 0;
    font-size: 0.9em;
    color: #555;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.subscription-list li:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

/* Checklist item status colors */
.status-compliant {
    background-color: #e6ffe6 !important;
    /* Light green */
    border-left: 4px solid #28a745 !important;
    /* Solid green border */
    transition: all 0.3s ease;
}

.status-partial {
    background-color: #fff3cd !important;
    /* Light yellow */
    border-left: 4px solid #ffc107 !important;
    /* Solid yellow border */
    transition: all 0.3s ease;
}

.status-noncompliant {
    background-color: #ffe6e6 !important;
    /* Light red */
    border-left: 4px solid #dc3545 !important;
    /* Solid red border */
    transition: all 0.3s ease;
}

/* Ensure the inner li elements don't get colored unless specifically marked */
li li {
    background-color: #f9f9f9 !important;
    border-color: #e0e0e0 !important;
}

/* When inner li gets a status, override the default */
li li.status-compliant,
li li.status-partial,
li li.status-noncompliant {
    background-color: inherit !important;
    border-color: inherit !important;
}

/* Add status color classes */
.status-compliant {
    background-color: #e6ffe6;
    /* Light green */
    border-left: 4px solid #28a745;
    /* Solid green border */
}

.status-partial {
    background-color: #fff3cd;
    /* Light yellow */
    border-left: 4px solid #ffc107;
    /* Solid yellow border */
}

.status-noncompliant {
    background-color: #ffe6e6;
    /* Light red */
    border-left: 4px solid #dc3545;
    /* Solid red border */
}

/* Section status colors */
section.status-compliant {
    background-color: #e6ffe6 !important;
    /* Light green */
    border-left: 4px solid #28a745 !important;
    /* Solid green border */
    transition: all 0.3s ease;
}

section.status-partial {
    background-color: #fff3cd !important;
    /* Light yellow */
    border-left: 4px solid #ffc107 !important;
    /* Solid yellow border */
    transition: all 0.3s ease;
}

section.status-noncompliant {
    background-color: #ffe6e6 !important;
    /* Light red */
    border-left: 4px solid #dc3545 !important;
    /* Solid red border */
    transition: all 0.3s ease;
}

/* Status color styles with higher specificity */
div.status-options.status-compliant {
    background-color: #e6ffe6;
    border-left: 4px solid #28a745;
}

div.status-options.status-partial {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

div.status-options.status-noncompliant {
    background-color: #ffe6e6;
    border-left: 4px solid #dc3545;
}

.date-container {
    margin: 20px 0;
    text-align: center;
}

#displayDate {
    margin: 10px 0;
    font-weight: bold;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .date-container {
        margin: 20px 0 !important;
        display: block !important;
    }
    
    #displayDate {
        display: block !important;
        visibility: visible !important;
        font-size: 14pt !important;
        font-weight: bold !important;
        margin: 10px 0 !important;
        color: black !important;
    }
    
    #displayDate:empty::before {
        content: attr(data-date);
        display: block;
    }

    /* Force color printing in all browsers */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Prevent page breaks inside elements */
    .file-display, 
    .chart-container,
    .chart-item,
    .stats,
    li,
    section {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    /* Ensure colors print */
    .severity-high {
        background-color: #FFB6C1 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .severity-medium {
        background-color: #FFE4B5 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .severity-low {
        background-color: #E0FFFF !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Ensure proper page breaks */
    h1, h2, h3, h4 {
        break-after: avoid !important;
        page-break-after: avoid !important;
    }
}

.export-partial-button {
    position: fixed;
    top: 50px;
    /* Position below the import button */
    left: 50%;
    transform: translateX(-50%);
    background-color: #0078d7;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

.export-partial-button:hover {
    background-color: #005a9e;
}
