:root {
    --spec-table-row-height: 20px;
    --gap-standard: 5px;
    --input-height: 20px;
    --header-background-color: lightgrey;
    --header-color: darkgrey;
    --input-bordercolor: lightgrey;
    --input-bordercolor-focus: darkgrey;
    --input-backgroundcolor: rgba(240, 240, 240, 0.3);
    --input-hover-backgroundcolor: rgba(140, 140, 140, 0.3);
    --input-borderwidth: 1px;
    --input-borderradius: 6px;
    --input-transition: all 0.2s ease-in-out;
    /* Composite (Optional - for maximum speed) */
    --input-border: var(--input-borderwidth) solid var(--input-bordercolor);
    --input-border-focus: var(--input-borderwidth) solid var(--input-bordercolor-focus);
    --button-height: 20px;
    --button-backgroundcolor: rgba(240, 240, 240, 0.7);
    --drag-size: 8px;
    --drag-bordersize: 3px;
    --drag-color: rgb(240, 240, 240);
    --drag-backgroundcolor: rgb(220, 220, 220);
}

.no-select {
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE/Edge */
    user-select: none;
    /* Standard */
}

div {
    overflow: hidden;
    scroll-snap-type: both mandatory;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #505050;
}

html,
body {
    font-family: 'Helvetica', 'Noto Sans Symbols 2', 'Segoe UI Symbol', 'DejaVu Sans', sans-serif;
    font-size: small;
}

.act-header {
    display: flex;
    height: 35px;
    background: var(--header-background-color);
    font-size: 15px;
    font-weight: 600;
    color: var(--header-color);
    align-items: center;
    padding: 0 5px 0 20px;
    gap: 20px;
}

.act-header-left {
    display: flex;
    gap: 30px;
    margin-right: auto;
}

.act-header-left a,
.act-header-left button {
    text-decoration: none;
    color: gray;
    transition: color 0.2s;
}

.act-header-left a:hover,
.act-header-left button:hover {
    color: black;
}

.act-header-right {
    display: flex;
    gap: 5px;
}

.act-header-right span {
    background: #ccc;
    padding: 2px 6px;
    border-radius: var(--input-borderradius);
    font-size: 11px;
}

.act-label {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-standard);
    white-space: nowrap;
}

.act-label:hover .toggleCheck {
    background-color: #ddd;
}

.act-button {
    height: var(--button-height);
    border: var(--input-border);
    border-radius: var(--input-borderradius);
    transition: var(--input-transition);
    background-color: var(--button-backgroundcolor);
    padding: 0px 3px 0px 3px;
}

.act-button:not(:disabled):hover {
    background-color: var(--input-hover-backgroundcolor);
    cursor: pointer;
    /* Also good to add a pointer only when enabled */
}

.act-button:not(:disabled):active {
    transform: scale(0.96);
    /* Shrinks it by 4% */
    filter: brightness(0.9);
    /* Makes it slightly darker */
    transition: transform 0.05s;
    /* Makes the "push" instant */
}

.act-button :disabled {
    opacity: 0.6;
    background-color: var(--button-backgroundcolor);
    /* Keeps it at the base color */
}

.act-select-dropdown,
.act-textinput,
.numberinput2digit,
.numberinput4digit,
.numberinput-int,
.numberinput-float {
    border: var(--input-border);
    border-radius: var(--input-borderradius);
    transition: var(--input-transition);
    background-color: var(--input-backgroundcolor);
    height: var(--input-height);
}

.act-select-dropdown:hover,
.act-textinput:hover,
.numberinput2digit:hover,
.numberinput4digit:hover,
.numberinput-int:hover,
.numberinput-float:hover {
    background-color: var(--input-hover-backgroundcolor);
}

.act-select-dropdown:focus,
.act-textinput:focus,
.numberinput2digit:focus,
.numberinput4digit:focus,
.numberinput-int:focus,
.numberinput-float:focus {
    border: var(--input-border-focus) !important;
    /* Force the red border */
    box-shadow: 0 0 0 1px var(--input-bordercolor-focus);
    outline: none !important;
}

.numberinput2digit {
    width: 30px;
    text-align: right;
    padding: 2px;
}

.numberinput4digit {
    width: 60px;
    text-align: right;
    padding: 2px;
}

.numberinput-int,
.numberinput-float {
    width: 80px;
    text-align: right;
    padding: 2px;
}

.act-textinput {
    width: 300px;
    text-align: left;
    padding: 2px;
}

.melt-out {
    /* Use a standard ease or cubic-bezier for a more natural feel */
    animation: melt-fade 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
    /* These 3 lines are the "Smoothness" secret */
    backface-visibility: hidden;
    will-change: opacity, filter;
    transform: translate3d(0, 0, 0);
}

@keyframes melt-fade {
    0% {
        opacity: 1;
        filter: blur(0px);
    }

    100% {
        opacity: 0;
        filter: blur(4px);
    }
}

table.specification-table-l,
table.specification-table-r {
    table-layout: fixed;
    min-width: 300px;
    max-width: 300px;
    border: none;
    white-space: nowrap;
    user-select: none;
}

table.specification-table-l tr,
table.specification-table-r tr {
    height: 22px;
}

table.specification-table-l td {
    height: var(--spec-table-row-height);
    text-align: left;
    padding: 0px 0px 0px 10px;
}

table.specification-table-r td {
    height: var(--spec-table-row-height);
    text-align: right;
    padding: 0px 10px 0px 0px;
}

.radio-container {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-left: 25px;
    margin-right: 10px;
    cursor: pointer;
    user-select: none;
}

/* Hide the browser's default radio button */
.radio-container input {
    position: absolute;
    opacity: 0;
}

/* On mouse-over, add a grey background color */
.radio-container:hover input~.radiobutton {
    background-color: var(--input-hover-backgroundcolor);
}

/* Show the indicator when checked */
.radio-container input:checked~.radiobutton:after {
    display: block;
}

/* Style the indicator (white dot) */
.radio-container .radiobutton:after {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: var(--input-borderradius);
    background: grey;
}

/* Create a custom radio button (the outer circle) */
.radiobutton {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: var(--input-height);
    width: var(--input-height);
    border: var(--input-border);
    border-radius: var(--input-borderradius);
    transition: var(--input-transition);
    background-color: var(--input-backgroundcolor);
}

/* Create the indicator (the dot/inner circle) */
.radiobutton:after {
    content: "";
    position: absolute;
    display: none;
}

.toggleCheck {
    height: var(--input-height);
    width: var(--input-height);
    display: flex;
    align-items: center;
    justify-content: center;
    border: var(--input-border);
    border-radius: var(--input-borderradius);
    transition: var(--input-transition);
    background-color: var(--input-backgroundcolor);
}

.modified {
    background-color: rgba(250, 150, 150, 0.5) !Important;
}

.not-default {
    font-weight: bold;
}

.resizable-container {
    display: flex;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.drag-v,
.drag-h {
    border-style: solid;
    border-width: var(--drag-bordersize);
    border-color: var(--drag-color);
    background-color: var(--drag-backgroundcolor);
    transition: var(--input-transition);
}

.drag-v:hover,
.drag-h:hover {
    background-color: rgb(200, 200, 200);
}

.drag-v {
    width: var(--drag-size);
    height: 100%;
    cursor: ew-resize;
}

.drag-h {
    height: var(--drag-size);
    width: 100%;
    cursor: ns-resize;
}

.context-menu {
    position: fixed;
    background-color: white;
    border: 1px solid gray;
    z-index: 1000;
    border-radius: var(--input-borderradius);
}

.context-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.context-menu li {
    padding: 5px 5px;
    cursor: pointer;
}

.context-menu li:hover {
    background-color: #eee;
}

table.act-table,
table.act-table-shape {
    user-select: none;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    width: max-content;
    position: absolute;
    top: 0;
    left: 0;
}

table.act-table tr.rh_single td,
table.act-table tr.rh_single th {
    height: 21px;
    max-height: 21px;
    overflow: hidden;
    white-space: nowrap;
}

table.act-table tr.rh_double td,
table.act-table tr.rh_double th {
    height: 40px;
    max-height: 40px;
    overflow: hidden;
    white-space: normal;
}

table.act-table td {
    padding: 0px 3px 0px 3px;
    overflow: hidden;
    font-family: Courier New, Courier, monospace;
    text-align: right;
    box-shadow: inset -1px -1px 0 #ddd;
    outline: none;
}

table.act-table-shape td {
    overflow: hidden;
    outline: none;
}

table.act-table tr:first-of-type td {
    box-shadow: inset 0 1px 0 0 #ddd, inset -1px -1px 0 #ddd !important;
}

table.act-table td:first-child {
    box-shadow: inset 1px 0 0 0 #ddd, inset -1px -1px 0 #ddd !important;
}

table.act-table tr:first-of-type td:first-child {
    box-shadow: inset 1px 1px 0 0 #ddd, inset -1px -1px 0 #ddd !important;
}

table.act-table .str {
    font-family: inherit;
    text-align: center;
}

table.act-table .left {
    text-align: left;
}

table.act-table .right {
    text-align: right;
}

table.act-table .center {
    text-align: center;
}

table.act-table .lg,
table.act-table-shape .lg {
    background-color: lightgray;
}

table.act-table .c0,
table.act-table-shape .c0 {
    background-color: rgb(229, 245, 251);
}

table.act-table .c1,
table.act-table-shape .c1 {
    background-color: rgb(209, 205, 228);
}

table.act-table .c2,
table.act-table-shape .c2 {
    background-color: rgb(210, 231, 241);
}

table.act-table .c3,
table.act-table-shape .c3 {
    background-color: rgb(222, 225, 240);
}

table.act-table .c4,
table.act-table-shape .c4 {
    background-color: rgb(196, 198, 211);
}

table.act-table .c5,
table.act-table-shape .c5 {
    background-color: rgb(173, 175, 186);
}

table.act-table .c6,
table.act-table-shape .c6 {
    background-color: rgb(169, 188, 195);
}

table.act-table .c7,
table.act-table-shape .c7 {
    background-color: rgb(183, 204, 202);
}

table.act-table,
table.act-table-shape .white {
    background-color: white;
}

table.act-table .dg,
table.act-table-shape .dg {
    background-color: darkgray;
}

table.act-table-info {
    border: none;
    user-select: none;
    position: absolute;
    top: 0;
    left: 0;
}

table.act-table-info td {
    border: none;
    padding: 0px 1px 0px 3px;
    overflow: hidden;
    text-align: center;
}

table .actlayout {
    table-layout: fixed;
    word-wrap: break-word;
    top: 0;
    left: 0;
    border: none;
    user-select: none;
}

.error {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
}