/* Custom blue theme based on Bulma */
.navbar-item img {
    max-height: 5rem;  /* Adjust the max-height of the logo */
    width: auto;       /* Ensure the width adjusts to maintain aspect ratio */
    max-width: 12rem;
}    
.navbar-start {
    width:30%;
}

:root {

    --primary: linear-gradient(to right, #00a5c8, #13a538);; /* Blue */
    --navbar: linear-gradient(to right, #00a5c8, #13a538);;
    --link: rgba(255, 255, 255, 0.25); 
    --info: rgba(255, 255, 255, 0.25); 
    --success: #58d68d; /* Light Greenish-Blue */
    --warning: #f39c12; /* Yellow */
    --danger: #e74c3c; /* Red */
    --table-main: #f2f2f2;
    --table-blue: #edf7fe;
    --vuln-info: #b9e3ffb4;
    --vuln-possible: #fdffc0b4;
    --vuln-potential:#fcd9a0b4;
    --vuln-critic: #f8d7dab4;
    --vuln-info-strong: blue;
    --vuln-possible-strong: rgb(255, 225, 0);
    --vuln-potential-strong:orange;
    --vuln-critic-strong: red;

    --dashboards-red-color: red;
    --dashboards-green-color: green;
    --dashboards-backgorund-red-color: #f8d7da;
    --dashboards-backgorund-green-color: #d4edda;
    --dashboards-blue-color: #007bff;
    --dashboards-grey-color: #808080;
    --dashboards-backgorund-grey-color: #D3D3D3;

    --buttons-background-color: rgba(216, 187, 187, 0.3); /* semi-transparent white */;

    --transparent-info: 
}

html{
    background: var(--primary);
}

/* 
aaaa
aa

body * {
  transition: width 0.3s ease, height 0.3s ease;
}*/

body{
    font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: normal;
}
/* Hero section styling */
.hero.is-primary {
    background: var(--primary);
}

.hero.is-primary .navbar-link.is-active,
.hero.is-primary .navbar-link:hover,
.hero.is-primary a.navbar-item.is-active,
.hero.is-primary a.navbar-item:hover {
    background: var(--link); /* Change hover and active background to the darker blue */
    color: white; /* Ensure text stays white */
}

/* Navbar base styling */
.hero .navbar {
    transition: background-color 0.3s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 11%;
}
.hero .navbar.default {
    background: var(--primary); 
}

.hero .navbar.scrolled {
    background: var(--navbar);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Optional shadow */
}
.navbar-item {
    color: white; /* Make sure text is white */
}
.right-after-image{
    margin-left: 15%;
}

/* Button customizations */
.button {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.button:hover {
    background-color: var(--link);
}

/* Table customizations */
.table th {
    background-color: var(--table-main);
    color: white;
}

.table td {
    background-color: #ecf0f1; /* Default light background */
    word-wrap: break-word;
    overflow-wrap: break-word ;

}

/* Odd rows */
.table tr:nth-child(odd) td {
    background-color: #f8f9fa; /* Lighter grey background for odd rows */
}

/* Even rows */
.table tr:nth-child(even) td {
    background-color: #e9ecef6f; /* Slightly darker grey background for even rows */
}

table.dataTable thead th, table.dataTable thead td{
    padding-top: 10px;
    padding-right: 20px;
    padding-bottom: 10px;
    padding-left: 7px;
}

.hero-body {
    width: 100%;
    padding: 0; /* Remove padding if needed */
    padding-top: 100px;
}

.container {
    width: 100%; /* Allow container to take full width */
    padding: 0;  /* Optional: Remove padding to make it span the whole page */
}



table {
    width: 90%;
    margin: auto;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.6); /* Semi-transparent white */
    backdrop-filter: blur(5px); /* Adds a subtle blur effect */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    table-layout: fixed;
}

.dataTables_wrapper {
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    margin: auto; /* Centers horizontally if no flex is used */
    width: 95%;
}

.dataTables_items {
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    margin: auto; /* Centers horizontally if no flex is used */
    width: 9%;
}

/* Table header */
.table th {
    background-color: var(--table-blue); /* Semi-transparent primary blue */
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid var(--link);
}

/* Table rows with transparency */
.table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}


/* Hover effect */
.table tr:hover {
    color: grey;
}
/* Responsive table */
@media screen and (max-width: 768px) {
    .table {
        font-size: 14px;
    }
    
    .table th, 
    .table td {
        padding: 10px;
    }
}

.vulns_table td:first-child,
.vulns_table th:first-child {
    width: 50%;
}

.vulns_table td:nth-child(2),
.vulns_table th:nth-child(2) {
    width: 10%;
}

.vulns_table td:nth-child(3),
.vulns_table th:nth-child(3)
 {
    width: 4%;
}
.vulns_table td:nth-child(4),
.vulns_table th:nth-child(4)
 {
    width: 7%;
}
.vulns_table td:nth-child(5),
.vulns_table th:nth-child(5) {
    width: 29%;
}


.vulns_table_extended td:first-child,
.vulns_table_extended th:first-child {
    width: 20%;
}

.vulns_table_extended td:nth-child(2),
.vulns_table_extended th:nth-child(2) {
    width: 18%;
}

.vulns_table_extended td:nth-child(3),
.vulns_table_extended th:nth-child(3)
 {
    width: 37%;
}

.vulns_table_extended td:nth-child(4),
.vulns_table_extended th:nth-child(4) {
    width: 5%;
}
.vulns_table_extended td:nth-child(5),
.vulns_table_extended th:nth-child(5) {
    width: 20%;
}

.ecus_vulns_table td:first-child,
.ecus_vulns_table th:first-child {
    width: 50%;
}

.ecus_vulns_table td:nth-child(2),
.ecus_vulns_table th:nth-child(2) {
    width: 10%;
}

.ecus_vulns_table td:nth-child(3),
.ecus_vulns_table th:nth-child(3)
 {
    width: 6%;
}
.ecus_vulns_table td:nth-child(4),
.ecus_vulns_table th:nth-child(4)
 {
    width: 34%;
}


.items_table td:first-child,
.items_table th:first-child {
    width: 15%;
}

.items_table td:nth-child(2),
.items_table th:nth-child(2) {
    width: 15%;
}

.items_table td:nth-child(3),
.items_table th:nth-child(3)
 {
    width: 40%;
}

.items_table td:nth-child(4),
.items_table th:nth-child(4) {
    width: 2%;
}
.items_table td:nth-child(5),
.items_table th:nth-child(5) {
    width: 12%;
}
.items_table td:nth-child(6),
.items_table th:nth-child(6) {
    width: 5%;
}
.items_table td:nth-child(7),
.items_table th:nth-child(7) {
    width: 2%;
}
.items_table td:nth-child(8),
.items_table th:nth-child(8) {
    width: 5%;
}
.items_table td:nth-child(9),
.items_table th:nth-child(9) {
    width: 5%;
}
.centered_info_data td, 
.centered_info_data th {
  text-align: center;  /* Centers text horizontally */
  vertical-align: middle;  /* Centers text vertically */
}

h1 {
    color: white; /* White text */
    font-size: 2rem; /* Big letters */
    font-weight: bold; /* Make it bold */
    text-transform: uppercase; /* Uppercase for emphasis */
    letter-spacing: 2px; /* Spaced-out letters for better readability */
    text-align: center; /* Centered text */
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3); /* Soft shadow for contrast */
    padding: 20px 0; /* Add spacing */
}
h2 {
    color: white; /* White text */
    font-size: 1rem; /* Big letters */
    font-weight: bold; /* Make it bold */
    text-transform: uppercase; /* Uppercase for emphasis */
    letter-spacing: 2px; /* Spaced-out letters for better readability */
    text-align: center; /* Centered text */
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3); /* Soft shadow for contrast */
    padding: 20px 0; /* Add spacing */
}
.toggle-button {
    background-color: var(--info); /* Matches primary blue theme */
    color: white;
    font-size: 1rem;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s;
    display: block; /* Makes sure it's properly aligned */
    margin: 20px auto; /* Centers the button */
}

.toggle-button:hover {
    background-color: var(--link); /* Darker blue on hover */
    transform: scale(1.05); /* Slight scaling effect */
}

.toggle-button:active {
    transform: scale(0.95); /* Press effect */
}
.toggle-button:disabled {
    background-color: #ccc;   /* Gray background when disabled */
    color: #666;              /* Dimmed text color */
    cursor: not-allowed;      /* Shows forbidden cursor */
    opacity: 0.6;             /* Makes it look inactive */
    transform: none;          /* Prevents hover/active effects */
    box-shadow: none;         /* Removes shadows if you add them later */
}
iframe {
    overflow: hidden;
    scrollbar-width: none; /* For Firefox */
  }
  
  iframe::-webkit-scrollbar {
    display: none; /* For Chrome, Safari, and Edge */
  }


td a.info-level {
    color: var(--vuln-info-strong) !important;
    font-weight: bold;
}

td a.possible-level {
    color: var(--vuln-possible-strong) !important;
    font-weight: bold;
}

td a.potential-level {
    color: var(--vuln-potential-strong) !important;
    font-weight: bold;
}

td a.critic-level {
    color: var(--vuln-critic-strong) !important;
    font-weight: bold;
}

.dataTables_length{
    padding: 4px;
}
.dataTables_filter{
    padding: 4px;
}
.navbar-buttons{
    display: flex;
    margin-left: 20%;
}
.client_div{
    margin-left:10%;
    display: flex;
}
.our_logo{
    left:10%;
}

/*
#loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.hero.is-fullheight .hero-body {
    display: none;
}*/

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

.tooltip .tooltiptext {
    visibility: hidden;
    width: max-content;
    background-color: black;
    color: #fff;
    text-align: center;
    padding: 5px 8px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    top: 100%; /* position below the image */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
.type-image {
    width: 70%;
}


.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  background-color: red;
  border-radius: 50%;
  animation: blink 1s infinite;
  vertical-align: middle;
  position: relative;
  bottom: 15%
;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}


.info-container .stat-box, .stat-box {

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    border: 3px solid var(--dashboards-blue-color);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
    
.stat-box:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}
 .transparent-box .red-box , .info-container .red-box , .red-box  {
    border-color: var(--dashboards-red-color);
    background-color: var(--dashboards-backgorund-red-color);
}
 .transparent-box .grey-box , .info-container .grey-box , .grey-box  {
    border-color: var(--dashboards-grey-color);
    background-color: var(--dashboards-backgorund-grey-color);
}
 .transparent-box .green-box, .info-container .green-box, .green-box {
    border-color: var(--dashboards-green-color);
    background-color: var(--dashboards-backgorund-green-color);
}

.info-container .transparent-stat-box,  .transparent-stat-box{
    background: transparent;
    border: none;
}

.green {
    color: var(--dashboards-green-color) !important;
}
.red {
    color: var(--dashboards-red-color) !important;
}
.grey {
    color: var(--dashboards-grey-color) !important;
}
.square {
  background: white;
  border: 2px solid #333;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.title-stats {
  margin-bottom: 10px;
  font-size: 1.2em;
  color: #343a40;
}

.stats-value {
    font-size: 65px;
    font-weight: bold;
    color: var(--dashboards-blue-color);
}

.info-container {
  display: flex;
  gap: 20px;
  justify-content: center; /* Optional: center all blocks */
  flex-wrap: nowrap; /* Force everything in one row */
  margin-top: 1%;
}

.vulns-type-container {
  margin-top: 2%;
  display: flex;
  justify-content: center; /* Center items horizontally */
  align-items: center;     /* Align items vertically (optional) */
  gap: 80px;               /* Space between the two boxes */
}


/***GROUPED BY FROM INFO,VULNS INFO::*/
    /* New boxes for vulnerabilities */
.vuln-box {
    width: 12%;  /* Set size for new boxes */
    height: 24%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #e9ecef;
    border: 3px solid #007bff;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1%;
    text-align: center;
    opacity: 1;  /* Set them as background elements */
    color: var(--dashboards-red-color);
}
.vuln-box.selected {
    background-color: #ffffff; /* White when active */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.vuln-box.deselected {
    background-color: #d3d3d3; /* Greyed out when not active */
    opacity: 0.5;
}
.vuln-box .vuln-info-stats{
    color: black;
}

/* Hover effect - Slightly enlarges and adds more shadow */
.vuln-box:hover {
    transform: scale(1.05); /* Slightly enlarges */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Adds deeper shadow */
}

.vuln-box-text {
    font-size: 100%;  /* Increased text size for descriptions */
    color: #343a40;
    margin-top: 5%;
}

/* Positioning for new boxes */
#infoBox {
    top: 65%;
    left: 13%;
    background-color: var(--vuln-info);
    border: 3px solid var(--vuln-info-strong);
    
}
#infoBox .vuln-info-stats {
    color:var(--vuln-info-strong);
}
#possibleBox {
    top: 65%;
    left: 33%;
    background-color: var(--vuln-possible);
    border: 3px solid var(--vuln-possible-strong);
}
#possibleBox .vuln-info-stats {
    color:var(--vuln-possible-strong);
}

#potentialBox {
    top: 65%;
    left: 53%;
    background-color: var(--vuln-potential);
    border: 3px solid var(--vuln-potential-strong);
}
#potentialBox .vuln-info-stats {
    color:var(--vuln-potential-strong);
}
#criticalBox {
    top: 65%;
    left: 73%;
    background-color: var(--vuln-critic);
    border: 3px solid var(--vuln-critic-strong);
}
#criticalBox .vuln-info-stats {
    color:var(--vuln-critic-strong);
}

.vuln-info-stats {
    font-size: 400%;  /* Increased font size for numbers */
    font-weight: bold; 
    color: var(--dashboards-blue-color);
}

.info-box {
  position: relative;
  display: flex;
  align-items: flex-start;
  border: 1px solid #3e8ed0;
  background-color: #f0f8ff;
  border-radius: 0.375rem;
  padding: 1rem 1rem 1rem 3rem; /* left padding to make room for icon */
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #363636;
}

.info-box::before {
  content: "";
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 24px;
  height: 24px;
  background-image: url('../../../static/images/info.png'); /* replace with actual image path */
  background-size: contain;
  background-repeat: no-repeat;
}


/**STUFF ABOUT ALERTS */
.alerts-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--buttons-background-color);
  border: 2px solid black;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  height: fit-content;
}

.alerts-box:hover {
  background-color: #cde7ff;
}

.alerts-box img {
  width: 32px;
  height: 32px;
}

.alerts-box span {
  font-weight: bold;
  color: black;
}

.alerts-icon-container {
  position: relative;
  display: inline-block;
}

.alert-counter {
  position: absolute;
  bottom: -6px;
  right: -4px;
  background-color: #faf286;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 50%;
  min-width: 18px;
  text-align: center;
  line-height: 1;
  pointer-events: none;
}

.alerts-modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.alerts-modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 2px solid #444;
  width: 60%;
  border-radius: 8px;
}

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

.close-modal:hover {
  color: black;
}

.hidden {
  display: none;
}

.alert-card {
  background-color: #fff4f4;
  border-left: 5px solid #f44336;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.historical_alert_ecu{
background-color: #ecd0d0;
border-left: 5px solid #c7a9a7;
}

.alert-header {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.alerts-modal-content h2{
    color:#4e4e4e;
}
.alert-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.alert-source {
  font-weight: bold;
  color: #b00020;
}

.alert-message {
  color: #333;
  font-size: 0.95rem;
}

.no-alerts {
  text-align: center;
  padding: 40px 20px;
  color: #4CAF50;
  background-color: #f0fff4;
  border: 2px dashed #c8e6c9;
  border-radius: 12px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.no-alerts-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.no-alerts-text {
  font-size: 1.1rem;
  font-weight: 500;
}

.alerts-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 1rem;
}

.alerts-title {
  margin: 0;
  text-align: center;
}

.refresh-alerts-btn {
  position: absolute;
  right: 40%;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.refresh-alerts-btn img {
  width: 20px;
  height: 20px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.refresh-alerts-btn img:hover {
  opacity: 1;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rotating {
  animation: rotate 1s linear infinite;
}

/**END ALERTS ------- */


.create-new-dtc {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--buttons-background-color);
  border: 2px solid black;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  height: fit-content;
}

.create-new-dtc:hover {
  background-color: #cde7ff;
}

.create-new-dtc img {
  width: 32px;
  height: 32px;
}

.create-new-dtc span {
  font-weight: bold;
  color: black;
}


/* MAIN INFO..*/
.bus-type-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
  width: 100%;
  overflow-y: auto;
  max-height: 260px; /* control overflow if needed */
}

.bus-type-card {
  background-color: #eef;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-weight: bold;
  color: #333;
  margin-left: 20px;
  margin-right: 20px;
  margin-top: 5px;
  margin-bottom: 5px;
}
.bus-type-list:hover {
    margin-bottom: 10px;
}
.bus-type-card:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/*BUS INFO ..*/


.last-conn-tag {
  background-color: rgba(240, 255, 238, 0.459);
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-weight: bold;
  color: #333;
  margin-left: 20px;
  margin-right: 20px;
  margin-top: 5px;
  margin-bottom: 5px;
}

.last-conn-val {
  background-color: rgba(247, 255, 238, 0.205);
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-weight: bold;
  color: #333;
  margin-left: 20px;
  margin-right: 20px;
  margin-top: 5px;
  margin-bottom: 5px;
}
.last-conn-val:hover {
    margin-bottom: 10px;
}
.last-conn-val:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}


/**END**/

.bottom-frameMainDash {
    width: 100%;
    height: 80vh; /* or 100% of parent if parent has height */
}