/* General Styles */
:root {
    --primary-accent: #0856a9;
    --primary-accent-hover: #014389;
    --secondary-accent: #6c757d;
    --secondary-accent-hover: #495055;
    --info-accent: #17a2b8;
    --success-accent: #006334;
    --success-accent-hover: #004926;
    --danger-accent: #dc3545;
    --danger-accent-hover: #c82333;
    --warning-accent: #974d04;
    --warning-accent-hover: #793e04;

    --text-color: #e0e0e0;
    --text-accent-color: #2280e3; 
    --text-placeholder: #bbb;
    --text-danger-color: #fa7a7a;
    --text-almost-hidden: #4a4a4a;

    --body-bg: #1e1e1e;
    --primary-bg: #2a2a2a;
    --primary-bg-accent: #2b2b2b;
    --primary-bg-accent-hover: #4b4b4b;
    --secondary-bg: #232323;
    --border-color: #444;
    --danger-border-color: #722; 
    
    --footer-height: 25px;
}

body {
    background-color: var(--body-bg);
    color: var(--text-color);
    font-family: "Roboto Mono", monospace;
    overflow: hidden; /* No body scrolling */
    height: fit-content;
}

body:has(.submodule) {
    background-color: #0000;
}
body:has(.submodule) footer {
    display: none;
}

.container-fluid {
    padding: 20px;
    background-color: var(--primary-bg);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    width: 90%;
    margin-top: 10px;
}

#header {
    background-color: var(--primary-bg);
    padding: 8px 20px;
    margin: 0;
    display: block;
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    width: 100vw;
}

footer {
    position: sticky;
    background-color: var(--primary-bg);
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    height: var(--footer-height);
    transform:translateY(25px); /* removed in core.js */
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    align-items: center;
    bottom: 0;
    color: var(--text-color);
    font-size: .8em;
    transition: all .2s ease-in-out;
}
footer .version span {
    color: var(--text-placeholder);
}
.div-hide {
    display: none !important;
}

#content {
    width: 100vw;
    height: 100%;
    overflow-y: auto;
}

.scroll-container {
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
}


h1, h2, h3 {
    font-weight: 600;
    color: var(--text-color);
}

hr {
    border-color: var(--border-color);
    margin: 20px 0;
}
h1.title{
    cursor: pointer;
}
.title span {
    color: var(--text-accent-color);
}

.overview-container {
    display: flex;
    justify-content: space-around;
    width: 100vw;
    height: 100px;
}

/* Layout Styles */
details {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 5px;
}

#scan-results {
    margin-top: 5px;
}

#overview-frame, #ip-table-frame {
    width: 100%;
}

#overview-frame {
    height: 105px;
}


#scan-form {
    width: 500px;
    margin: 0;
}
#scan-form label {
    margin-bottom: 0;
}
#scan-form input {
    z-index: 2;
    transition: all .2s ease-in-out;
    border-radius: 5px !important; /* override bootstrap stuff */
    padding-right: 34px;
    margin-right: -34px;
}


#scan-form .input-group button {
    background-color: var(--primary-bg-accent);
    border: 0;
    border-left: 1px var(--border-color) solid;
    transition: all .2s ease-in-out;
    height: 40px;
    border-radius: 0 5px 5px 0;
    margin-top: 1px;
    transform: translateX(.5px);
}
#scan-form .input-group button:hover {
    background-color: var(--primary-bg-accent-hover);
}
#scan-form .input-group button:active {
    background-color: var(--primary-accent);
}

.label-container {
    display: flex;
    justify-content: space-between;
}
#subnet-info {
    margin-right: 5px;
    font-size: .8em;
    padding: 2px 5px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    color: var(--text-color);
    transition: all .2s ease-in-out;
    height: 25px;
}
#scan-form.error #subnet-info,
#scan-form.error input
 {
    color: var(--text-danger-color);
    border-color: var(--danger-border-color);
    outline: 0 none;
}
#scan-form.error input:focus {
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(200, 85, 85, 0.6);
}

#app-actions a .material-symbols-outlined {
    font-size: inherit
}
#app-actions {
    padding-top: 5px;
}

#app-actions,
#app-actions a {
    font-size: 1.1em;
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}
#app-actions a:hover {
    color: var(--text-placeholder)
}

#power-button {
    color: var(--success-accent);
    transition: all .2s ease-in-out;
    cursor: pointer;
}
#power-button:hover {
    color: var(--text-danger-color);
}



@media screen and (max-width: 681px) {
    #power-button {
        left: auto;
        right: 0;
        border-width: 0 0 1px 1px;
        border-radius: 0 0 0 5px;
    }
    .container-fluid {
        width:98%;
        padding: 8px;
    }
}

/* Card Styles */
.card {
    background-color: var(--secondary-bg);
    border-color: var(--border-color);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}


/* Form / Input Styles */
form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

label {
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 5px;
}

input[type="text"], input[type="number"], select, .form-control {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 10px;
    font-size: 1rem;
    border-radius: 5px;
}

input[type="text"]:focus, select:focus, .form-control:focus {
    background-color: var(--body-bg);
    color: var(--text-color);
    border-color: var(--primary-accent);
    outline: none;
}

input::placeholder {
    color: var(--text-placeholder) !important;
}

button {
    margin-left: 15px;
    padding: 10px 20px;
}
.div-hide {
    display: none !important;
}

#scan-form #scan-submit {
    border: none;
    padding: 10px 20px;
}

/* Button Styling */
.btn-primary, button.btn-primary {
    background-color: var(--primary-accent);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}


.btn-primary:hover {
    background-color: var(--primary-accent-hover);
}
.btn-secondary, button.btn-secondary {
    background-color: var(--secondary-accent);
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}
.btn-secondary:hover {
    background-color: var(--secondary-accent-hover);
}
.btn-info, button.btn-info {
    background-color: var(--info-accent);
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}
.btn-info:hover {
    background-color: var(--info-accent);
    color: var(--text-color);
}
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    outline: none;
    border-radius: 5px;
    margin: 5px 0;
}

input[type="range"]::-webkit-slider-thumb,
input[type="range"]::-moz-range-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-accent);
    cursor: pointer;
}
#parallelism-value span {
    color: var(--text-danger-color);
    font-weight: 500;
}
.port-list-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.port-list {
    position: relative;
    background-color: var(--body-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px;
    cursor: pointer;
    width: 100%;
    user-select: none;
    appearance: none;  /* Hide default arrow */
    transition: all .2s ease-in-out;
}

.port-list:focus {
    border-color: var(--primary-accent-hover);
    outline: none;
}

.port-list-wrapper::after {
    content: '▼';
    position: absolute;
    top: 14px;
    right: 10px;
    pointer-events: none;
    color: var(--text-color);
}

.port-list-dropdown {
    display: none;
    position: absolute;
    background-color: var(--body-bg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
}

.port-list-dropdown.open {
    display: block;
}

.port-list-dropdown div {
    padding: 10px;
    color: var(--text-color);
    cursor: pointer;
}

.port-list-dropdown div:hover {
    background-color: var(--secondary-accent);
    color: var(--text-color);
}

.text-secondary {
    color: var(--secondary-accent)
}

/* Table Styles */
.table-container {
    width: 100vw;
    margin: auto;
}

.table {
    color: var(--text-color);
    width: 100%;
}

.table th, .table td {
    background-color: #282828;
    border-color: var(--border-color);
    color: var(--text-color);
}

.table thead th {
    background-color: var(--secondary-bg);
}

.table-striped tbody tr:nth-of-type(odd) td {
    background-color: var(--secondary-bg);
}

.table-striped tbody tr:nth-of-type(even) td {
    background-color: var(--primary-bg);
}

.table tbody tr:hover {
    background-color: var(--primary-bg-accent);
}


/* Badge Styles */
.badge-warning {
    background-color: var(--warning-accent);
}

.badge-success, .badge-info, .badge-secondary, .badge-warning {
    color: var(--text-color);
}

.badge-success {
    background-color: var(--success-accent);
}

.badge-info {
    background-color: var(--info-accent);
}

.badge-secondary {
    background-color: var(--secondary-accent);
}


/* Protocol Open Button Styles */
span.alt {
    color: var(--text-accent-color);
}
.colorful-buttons a{
    margin:2px;
    color: var(--text-color);
    border-color: var(--border-color);
}
.colorful-buttons a:nth-of-type(4n+1) {
    background-color: var(--primary-accent);
}

.colorful-buttons a:nth-of-type(4n+1):hover {
    background-color: var(--primary-accent-hover);
}

.colorful-buttons a:nth-of-type(4n+2) {
    background-color: var(--success-accent);
}

.colorful-buttons a:nth-of-type(4n+2):hover {
    background-color: var(--success-accent-hover);
}

.colorful-buttons a:nth-of-type(4n+3) {
    background-color: var(--warning-accent);
}

.colorful-buttons a:nth-of-type(4n+3):hover {
    background-color: var(--warning-accent-hover);
}

.colorful-buttons a:nth-of-type(4n+4) {
    background-color: var(--danger-accent);
}

.colorful-buttons a:nth-of-type(4n+4):hover {
    background-color: var(--danger-accent-hover);
}


/* Transitions */
input, select, button, details {
    transition: all 0.3s ease-in-out;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;  /* Width of the scrollbar */
}

::-webkit-scrollbar-track {
    background-color: var(--secondary-bg); /* Background of the scrollbar track */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color); /* Darker thumb for the scrollbar */
    border-radius: 10px;
    border: 3px solid var(--secondary-bg); /* Adds padding between the thumb and track */
}

.error-container {
    height: 300px;
    overflow-y: scroll;
    margin: 10px;
    padding: 5px;
    background-color: var(--secondary-bg);
}

/* For Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--secondary-bg);
}

.dropdown-menu {
    background-color: var(--body-bg);
    border: 1px solid var(--border-color);
    
}
.dropdown-menu.show{
    width: 100%;
    transform: translate(0px, 42px);
}

.dropdown-item {
    color: var(--text-color);
}

.dropdown-item:hover {
    background-color: var(--border-color);
    color: var(--text-color);
}


.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

#shutdown-sub-sub {
    color: var(--text-almost-hidden);
}


/* START overview container */
#overview-container {
    padding: 10px 0;
    width: 100vw;
}

#overview-container .card {
    height: 85px;
}

#overview-container .card-header {
    padding: 5px;
    font-size: 1rem;
    text-wrap: nowrap;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

#overview-container .card-body {
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-wrap: nowrap;
}

#overview-container .col-4 {
    min-width: 100px;
}

#progress-card {
    background-color: var(--primary-accent);
}

#runtime-card {
    background-color: var(--success-accent);
}

#stage-card {
    background-color: var(--warning-accent);
}
body:has(#overview-container) {
    display: flex;
    justify-content: center;
}
/* width of iFrame, not page */

@media screen and (max-width: 714px) {
    #overview-container .col-4 {
        padding: 0 5px;
    }
    
}
@media screen and (max-width: 672px) {
    #overview-container .card-header {
        font-size: .8rem;
    }
}
@media screen and (max-width: 555px) {
    #overview-container .col-4 {
        padding: 0 2px;
    }
    
}
@media screen and (max-width: 533px) {
    #overview-container .card-header {
        font-size: .6rem;
    }
    #overview-container .card-body {
        font-size: .8rem;
    }
    
}

/* END overview container */