/* Existing Styles */
/* Consolidated body styles */
body {
    font-family: Arial, sans-serif;
    margin: 0; /* Remove margin */
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2 {
    color: #333;
}

#cveFile {
    margin-bottom: 10px;
}

#summary {
    margin-top: 20px;
}

#summary-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

#summary-table {
    width: 460px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-table-row {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

.summary-section {
    flex: 1;
    background-color: #f9f9f9;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.summary-title {
    font-weight: bold;
    font-size: 1.2em;
    display: block;
    margin-bottom: 5px;
}

.summary-count {
    font-size: 1em;
}

#pii-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 10px; /* Space between the summary section and the new row */
}

.pii-summary-item {
    flex-direction: flow;
    align-items: center;
    width: calc(100% / 5 - 10px); /* Adjust based on the number of items and desired spacing */
    margin-right: 10px;
    background-color: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.pii-summary-row {
    display: flex;
    flex-direction: row;
    padding: 5px;
    padding-top: 0px;
}

.pii-summary-column {
    display: flex;
    flex-direction: column;
    padding: 5px;
}

.pii-summary-item:last-child {
    margin-right: 0;
}

.pii-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.pii-left-column {
    flex: 0 0 30%;
    text-align: center;
}

.pii-percentage-num {
    font-size: 3.2em;
    font-weight: bold;
}

.pii-percentage {
    font-size: 2em;
    font-weight: bold;
}

.pii-right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 10px;
}

.pii-summary-type {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 5px;
}

.pii-summary-quantity {
    font-size: 1em;
}

.pii-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    height: 20px;
}

.pii-bar {
    height: 100%;
    border-radius: 5px;
}

.pii-critical-bar {
    background-color: #e74c3c;
}

.pii-high-bar {
    background-color: #e67e22;
}

.pii-medium-bar {
    background-color: #f1c40f;
}

.pii-low-bar {
    background-color: #3498db;
}

.pii-overall-bar, .projected-bar {
    background-color: #4caf50;
}

#pii-summary {
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: none;
}

#pii-summary.fade-in {
    opacity: 1;
}

#impact-narrative, #zero-day-narrative, #leftover-vulnerabilities-narrative {
    font-size: 1em;
    line-height: 1.6;
    margin-top: 10px;
}

#impact-narrative span, #zero-day-narrative span, #leftover-vulnerabilities-narrative span {
    font-weight: bold;
}

#cve-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#cve-table thead th {
    position: sticky;
    top: 0;
    background-color: #f2f2f2;
    z-index: 1;
}

#summary-table th, #summary-table td, #cve-table th, #cve-table td {
    border: 1px solid #ddd;
    padding: 4px;
    text-align: left;
}

#summary-table th, #cve-table th {
    background-color: #f2f2f2;
    cursor: pointer;
}

#progress-bar {
    width: 100%;
    background-color: #f3f3f3;
    border: 1px solid #ddd;
    margin-top: 10px;
    position: relative;
    display: none;
}

#progress {
    width: 0;
    height: 20px;
    background-color: #4caf50;
    animation: progress-animation 2s infinite;
}

#progress-text {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
}

#progress-bar.active {
    display: block;
}

@keyframes progress-animation {
    0% { background-color: #41be45; }
    50% { background-color: #54d458; }
    100% { background-color: #41be45; }
}

#filters {
    margin-bottom: 12px; /* Add some space below the filters */
}

#filter-summary {
    margin-bottom: 8px; /* Add some space above the filter summary text */
    font-weight: bold;
}

.cve-item .memory-related {
    color: red;
    font-weight: bold;
}

#charts {
    flex-grow: 1;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

canvas {
    width: 100% !important;
    height: 300px !important;
    max-width: 500px;
    display: block;
}

.memory-related {
    background-color: red;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    margin-left: 8px;
    display: inline-block;
}

.partially-memory {
    background-color: #f39c12;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    margin-left: 8px;
    display: inline-block;
}

.memory-related-cwe {
    background-color: red;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    margin: 2px;
    display: inline-block;
}

.description-tooltip {
    position: relative;
    cursor: pointer;
}

.description-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px;
    border-radius: 5px;
    white-space: normal;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    min-width: 600px;
    overflow-wrap: break-word;
    left: 120%;
}

.description-tooltip:hover::after {
    opacity: 1;
}

.cwe-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.cwe-tooltip .cwe-tooltip-text {
    visibility: hidden;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    white-space: normal;
    max-width: 300px;
    left: 120%;
    opacity: 0;
    transition: opacity 0.3s;
}

.cwe-tooltip:hover .cwe-tooltip-text {
    visibility: visible;
    opacity: 1;
}

.description-row td {
    padding: 10px;
    white-space: normal;
}

.description-row strong {
    display: block;
    margin-bottom: 5px;
}

.description-row {
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
}

/* Modal styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Standardized Header and Footer Styling */
header {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    margin: 0; /* Remove margin */
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding: 0 20px; /* Add padding for spacing */
    box-sizing: border-box;
}

header nav .logo {
    font-size: 1.5em;
    color: #fff;
    text-decoration: none;
}

header nav .menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px; /* Add spacing between menu items */
}

header nav .menu li {
    display: inline;
}

header nav .menu a {
    color: #fff;
    text-decoration: none;
}

header nav .menu a:hover {
    text-decoration: underline;
}

footer {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    text-align: center;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

/* I think the container class is no longer used with the introduction of main-container */
.container {
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 20px;
}

/* Main container to hold the page content */
.main-container {
    flex: 1; /* This makes the main container take up the remaining space */
    padding: 20px;
}

button, input[type="submit"] {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
}

button:hover, input[type="submit"]:hover {
    background-color: #45a049;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.error-message {
    color: red;
    font-weight: bold;
    margin-bottom: 15px;
}

.success-message {
    color: green;
    font-weight: bold;
    margin-bottom: 15px;
}

.table-container {
    overflow-x: auto;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.table-container th, .table-container td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.table-container th {
    background-color: #f2f2f2;
}

/* General styles for login and register pages */
body.auth {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
}

/* Card styles for login and register pages */
.auth-card {
    display: flex;
    width: 1050px; /* 50% bigger */
    height: 600px; /* 50% bigger */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
}

/* Left section styles for auth card */
.auth-card-left {
    flex: 2;
    background: linear-gradient(135deg, #4c75cd, #192f6a); /* Darker gradient */
    color: #fff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card-left h2,
.auth-card-left p {
    color: #fff; /* Both header and text white */
}

.auth-card-left h2 {
    margin: 0 0 10px 0;
    font-size: 2em; /* Adjusted for larger card */
}

.auth-card-left p {
    margin: 0;
    font-size: 1.4em; /* Adjusted for larger card */
}

/* Right section styles for auth card */
.auth-card-right {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card-right h2 {
    margin: 0 0 20px 0;
    font-size: 2em; /* Adjusted for larger card */
}

/* Form input group styles */
.auth-input-group {
    margin-bottom: 15px;
}

.auth-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 1.2em; /* Adjusted for larger card */
}

.auth-input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1.2em; /* Adjusted for larger card */
}

/* Button styles */
.auth-button {
    width: 100%;
    padding: 10px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em; /* Adjusted for larger card */
}

.auth-button:hover {
    background-color: #45a049;
}

/* Error message styles */
.auth-error-message {
    color: red;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Additional styling for links */
.auth-card-right .link {
    margin-top: 10px;
    text-align: center;
    font-size: 1em;
}

.auth-card-right .link a {
    color: #4caf50;
    text-decoration: none;
}

.auth-card-right .link a:hover {
    text-decoration: underline;
}
