:root {
    /* Colors */
    --background-dialog-header: #E2E2E2;
    --background-dialog-content: #fff;
    --background-tire-value-hover: #dfdfdf;
    --background-tire-ok: green;
    --background-tire-error: red;

    /* Dimensions */
    --tire-width: 35px;
    --tire-height: 80px;
    --tire-border-radius: 6px;
    --tire-status-icon-size: 24px;
    --padding-tire-status-icon: 2px;
    --axle-min-length: 80px;
    --axle-first-spacer-height: 40px;

    /* Font */
    --font-family: Verdana, Geneva, Tahoma, sans-serif;
    --font-size: 8pt;
    --font-size-header-title: 1.2em;
    --font-size-tire-values: 1em;
}

/* Overlay to cover the entire viewport */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Popup styling to center it in the viewport */
#tire-sensor-dialog {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--background-dialog-content);
    border-radius: 3px;
    z-index: 1000;
    box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    max-width: 600px;
    min-width: 250px;
    font-size: var(--font-size);
    font-family: var(--font-family);
}

#tire-config-container {
    /*! margin: 20px 3px; */
    padding: 12px;
    max-height: 500px;
    overflow: auto;
}

.tire-sensor-dialog-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: var(--font-size-header-title);
    padding: 5px 10px;
    background-color: var(--background-dialog-header);
    color: #333;
}

.tire-sensor-dialog-title {
    user-select: none;
}

.btn-tire-sensor-dialog-close {
    position: absolute;
    right: 8px;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    box-sizing: border-box;
    opacity: 0.75;

}
.btn-tire-sensor-dialog-close:hover {
    cursor: pointer;
    opacity: 1;
}


.btn-tire-sensor-dialog-close:before, .btn-tire-sensor-dialog-close:after {
    position: absolute;
    left: 7px;
    content: ' ';
    height: 16px;
    width: 2px;
    background-color: #333;
}
.btn-tire-sensor-dialog-close:before {
    transform: rotate(45deg);
}
.btn-tire-sensor-dialog-close:after {
    transform: rotate(-45deg);
}

/* Tire and axle styling */
.axle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.axle-spacer {
    width: 100%;
    height: var(--axle-first-spacer-height);
}

.spacer-spare-tire {
    width: 100%;
    height: 2px;
    background-color:#333;
    margin-top: 10px;
    margin-bottom: 10px;
}

.axle {
    min-width: var(--axle-min-length);
    width: 100%;
    height: 5px;
    background-color: #333;
    border-radius: 5px;
    margin: 0 5px;
}

.axle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.tire-row {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.tire-spare-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.tire {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    width: var(--tire-width);
    height: var(--tire-height);
    border-radius: var(--tire-border-radius);
    border: 1px solid black;
    text-align: center;
    font-size: 12px;
    color: white;
    margin: 2px;
}

.tire-spare {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: var(--tire-height);
    height: var(--tire-width);
    border-radius: var(--tire-border-radius);
    border: 1px solid black;
    text-align: center;
    color: white;
    margin: 2px;
}

.tireStatusOk {
    background-color: var(--background-tire-ok);
}

.tireStatusProblem {
    background-color: var(--background-tire-error);
}

.tire-status-icons-container {
    box-sizing: border-box;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 1px;
}

.tire-spare-status-icons-container {
    padding: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 1px;
}

.tire-status-icon {
    width: var(--tire-status-icon-size);
    height: var(--tire-status-icon-size);
    cursor: help;
    border-radius: 3px;
    padding: var(--padding-tire-status-icon);
}

.tire-status-icon:hover {
    background: var(--background-tire-value-hover);
}

.tire-values-container {
    display:flex;
    flex-direction: column;
    align-items: center;
    border-radius: 5px;
    padding: 5px;
    width: var(--tire-width);
    height: var(--tire-height);
    box-sizing: border-box;
    justify-content: center;
    font-size: var(--font-size-tire-values);
}

.tire-spare-container {
    display:flex;
    flex-direction: column;
    align-items: center;
}

.tire-spare-values-container {
    display:flex;
    flex-direction: column;
    align-items: center;
    border-radius: 5px;
    padding: 5px;
    width: var(--tire-height);
    height: var(--tire-height);
    box-sizing: border-box;
    font-size: var(--font-size-tire-values);
}

.tire-value-row {
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    padding: 0px;
    margin: 0px;
    user-select: none;
    text-align: center;
    width: 100%;
    height: var(--tire-status-icon-size);
    padding: var(--padding-tire-status-icon);
    text-align: center;
    border-radius: 5px;
    cursor:help;
}

.tire-value-row:hover {
    background-color: var(--background-tire-value-hover);
}

.tire-value-error {
    color: var(--background-tire-error);
    font-weight: bold;
}
