/* General Body and Typography */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.6;
margin: 0;
padding: 2rem;
background-color: #f8f9fa;
color: #212529;
}
main {
max-width: 1200px;
margin: 0 auto;
background-color: #ffffff;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
h1, h2 {
color: #343a40;
border-bottom: 2px solid #dee2e6;
padding-bottom: 0.5rem;
margin-top: 0;
}
h1 {
font-size: 2.5rem;
}
h2 {
font-size: 1.75rem;
margin-top: 2rem;
}
/* Form and Controls */
#test-form {
display: flex;
flex-direction: column;
gap: 1.5rem;
margin-bottom: 2rem;
}
.url-input-container {
position: relative;
display: flex;
}
#url-input {
flex-grow: 1;
padding: 0.75rem 2.5rem 0.75rem 1rem;
font-size: 1rem;
border: 1px solid #ced4da;
border-radius: 4px;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
#url-input:focus {
border-color: #80bdff;
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
#history-toggle-button {
position: absolute;
right: 1px;
top: 1px;
bottom: 1px;
width: 2.5rem;
background: transparent;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: #6c757d;
}
#history-toggle-button svg {
width: 20px;
height: 20px;
}
#url-history-dropdown {
position: absolute;
top: 100%;
left: 0;
right: 0;
background: #fff;
border: 1px solid #ced4da;
border-top: none;
border-radius: 0 0 4px 4px;
max-height: 200px;
overflow-y: auto;
z-index: 1000;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
#url-history-dropdown div {
padding: 0.5rem 1rem;
cursor: pointer;
}
#url-history-dropdown div:hover {
background-color: #e9ecef;
}
.form-options {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1.5rem;
}
.form-group, fieldset {
border: 1px solid #dee2e6;
padding: 1rem;
border-radius: 4px;
}
fieldset {
padding-bottom: 0.5rem;
}
legend {
font-weight: bold;
padding: 0 0.5rem;
margin-left: -0.5rem;
}
label {
font-weight: bold;
margin-right: 0.5rem;
}
select {
padding: 0.5rem;
border-radius: 4px;
border: 1px solid #ced4da;
width: 100%;
}
.criticality-options {
display: flex;
flex-wrap: wrap;
gap: 1rem;
padding-top: 0.5rem;
}
.criticality-options div {
display: flex;
align-items: center;
gap: 0.3rem;
}
.form-actions {
display: flex;
justify-content: flex-end;
}
button[type="submit"], #new-test-button {
padding: 0.75rem 1.5rem;
font-size: 1rem;
font-weight: bold;
color: #fff;
background-color: #007bff;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s;
}
button[type="submit"]:hover, #new-test-button:hover {
background-color: #0056b3;
}
#controls {
text-align: center;
margin-bottom: 2rem;
}
/* Loading Spinner */
#loading {
text-align: center;
padding: 2rem;
}
.spinner {
border: 6px solid #f3f3f3;
border-top: 6px solid #007bff;
border-radius: 50%;
width: 50px;
height: 50px;
animation: spin 1s linear infinite;
margin: 0 auto 1rem;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Error Message */
#error-container {
background-color: #f8d7da;
color: #721c24;
padding: 1rem;
border: 1px solid #f5c6cb;
border-radius: 4px;
margin-bottom: 1rem;
}
/* Results Table */
#results-container {
overflow-x: auto;
overflow-y: auto;
max-height: 60vh;
}
#results-table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
}
#results-table th, #results-table td {
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid #dee2e6;
}
#results-table th {
background-color: #e9ecef;
cursor: pointer;
position: relative;
}
#results-table th.sort-asc::after,
#results-table th.sort-desc::after {
content: '';
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
border: 5px solid transparent;
}
#results-table th.sort-asc::after {
border-bottom-color: #343a40;
}
#results-table th.sort-desc::after {
border-top-color: #343a40;
}
#results-table tbody tr:hover {
background-color: #f1f3f5;
}
.criticality-critical { color: #dc3545; font-weight: bold; }
.criticality-serious { color: #fd7e14; }
.criticality-moderate { color: #ffc107; }
.criticality-minor { color: #17a2b8; }
td[data-label="Element"] code {
font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
font-size: 0.9em;
word-break: break-all;
background-color: #e9ecef;
padding: 0.2em 0.4em;
border-radius: 3px;
}
td[data-label="Suggested Actions"] ul {
margin: 0;
padding-left: 1.2rem;
}
td[data-label="Suggested Actions"] h6 {
margin: 0 0 0.5rem 0;
font-size: 1em;
}
/* Utility Classes */
.hidden {
display: none;
}
/* Responsive Design */
@media (max-width: 768px) {
body {
padding: 1rem;
}
main {
padding: 1rem;
}
#results-table thead {
display: none;
}
#results-table, #results-table tbody, #results-table tr, #results-table td {
display: block;
width: 100%;
}
#results-table tr {
margin-bottom: 1rem;
border: 1px solid #dee2e6;
border-radius: 4px;
}
#results-table td {
text-align: right;
padding-left: 50%;
position: relative;
border-bottom: 1px solid #e9ecef;
}
#results-table td:before {
content: attr(data-label);
position: absolute;
left: 0;
width: 45%;
padding-left: 1rem;
font-weight: bold;
text-align: left;
}
#results-table td:last-child {
border-bottom: none;
}
}