/** Copyright Â© vic bod  */
:root {
    --border-color: #c9d1d9;
    --border-color-hover: #6e7681;
    --font-family: monospace;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

#app {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    row-gap: 5px;
}

html,
body {
    box-sizing: border-box;
    font-size: 16px;
    font-family: Arial;
}

body {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    font-family: var(--font-family);
    flex-direction: column;
    align-items: center;
}

body {
    font-family: Arial, sans-serif;
    transition: background 0.3s, color 0.3s;
}

.light-mode {
    background: #ffffff;
    color: #000000;
}

.dark-mode {
    background: #121212;
    color: #ffffff;
}

.dark-mode textarea {
    background: #121212;
    color: #ffffff;
}

.switch {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.switch input {
    display: none;
}

.slider {
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 10px;
    position: relative;
    transition: background 0.3s;
}

.slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 1px;
    left: 2px;
    transition: 0.3s;
}

input:checked+.slider {
    background: #2196F3;
}

input:checked+.slider::before {
    transform: translateX(20px);
}

p {
    padding: 0;
    margin: 5px;
}

input,
textarea {
    font-family: var(--font-family);
    padding: 5px 15px;
    border-radius: 4px;
    width: 100%;
    border: 1px solid var(--border-color);
}

textarea {
    resize: vertical;
    min-height: 200px;
    line-height: 1.4;
    font-size: 16px;
    outline: none;
    font-size: 12px;
}

label {
    font-size: 14px;
}

label.italic {
    font-style: italic;
}

button {
    cursor: pointer;
    background: none;
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px 15px;
}

button:hover:not(:disabled) {
    border: 1px solid var(--border-color-hover);
}

#terminal_form div {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 5px;
    margin-top: 5px;
}

#port_info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
}

#port_info #status {
    text-transform: uppercase;
}

.hide {
    display: none;
}

/* Center the scrolling text container */
.scrolling-text-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    /* Hide overflowing content */
}

.scrolling-text {
    overflow-y: scroll;
}

@keyframes scrollText {
    0% {
        transform: translateY(100%);
        /* Start offscreen to the right */
    }

    100% {
        transform: translateY(-100%);
        /* Scroll completely offscreen to the left */
    }
}

/* Style tab links */
.tablink {
    background-color: #555;
    color: white;
    float: left;
    outline: none;
    cursor: pointer;
    padding: 14px;
    font-size: 16px;
    margin: 5px;
}

.tablink:hover {
    background-color: #777;
}

.tabcontent {
    color: white;
    display: none;
    padding: 20px;
    text-align: center;
    max-width: 200rem;
}

.tabcontent button {
    margin: 5px;
    color: white;
}

.light-mode .tabcontent button {
    margin: 5px;
    color: black;
}

button {
    border: 1px solid var(--border-color-hover);
}

.tablink-wrap {
    padding: 20px;
    align-self: center;
}

#wrap-content {
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 100%;
    padding: 20px;
    max-width: 1024px;
}

#controll {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px;
}

.tabcontent-wrap{
    display: flex;
    flex-direction: row;
    max-width: 40rem;
}

.dark-mode .checked {
    background-color: #660;
}

.checked {
    background-color: #ffff00;
}

.listening {
    background-color: #eca9a9;
}

#connect, #send-command, .active {
    background-color: #abe03f;
}

#disconnect {
    background-color: #ce3737;
}

button[disabled] {
    opacity: 0.5;
    background-color: gray;
}

#description{
    width: 40rem;
    min-height: 4rem;
    resize: none;
}