:root {
    --background: #222;
    --color: #fff;
    --footbar-color: #fff;
    --footbar-color-icon: #fffa;
    --footbar-background: #444;

    --border-table-registros: #fff2;

    --red: #f88;
    --green: #8f8;
}

body {
    padding: 0em;
    background: var(--background);
    color: var(--color);
    margin: 0;
    font-family: Arial;
}

header {
    width: 100%;
    background: #fff2;
    text-align: center;
    padding: 0.5em;
    box-sizing: border-box;
}

header h1 {
    text-transform: uppercase;
    font-size: 1em;
}

/* Menu */
a#menu_button,
a#menu_close {
    position: absolute;
    top: 0.5em;
    left: 0.5em;
    background: none;
    border: none;
    outline: none;
    color: var(--color);
    font-size: 1.5em;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
}

a#menu_close {
    left: unset;
    right: 0.5em;
}

menu {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    color: var(--color);
    z-index: 999;
    box-sizing: border-box;
    padding: 0;
}

menu.active {
    display: block;
}

menu nav li {
    list-style-type: none;
    padding: 1em;
    border-bottom: 1px solid var(--border-table-registros);
    font-size: 1.25em;
}

menu nav li a i {
    margin-right: 0.5em;
    width: 2em;
}
menu nav li a i::before {
    color: var(--green);
}

/** Menu segun estados **/
menu nav li { display: none; }
body.viaje_iniciado menu nav li { display: block; }
menu nav li:has(a[data-view="content_iniciar_viaje"]) { display: block; }  
body.viaje_iniciado menu nav li:has(a[data-view="content_iniciar_viaje"]) { display: none; }  

#menu_container {
    display: block;
    padding-top: 20vh;
    width: 100%;
    /* height: 10vh; */
    background-image: url('../assets/newlogo_named.png');
    background-position: center 1em;
    background-repeat: no-repeat;
    background-size: 20vh;
/*    filter: grayscale(1);*/
    z-index: 1000;

}
nav.bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--footbar-background);
    text-align: center;
    padding: 0em;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: space-evenly;
    align-items: center;
    box-sizing: border-box;
}

nav.bottom button {
    width: 33%;
    height: 8em;
    background: none;
    outline: none;
    color: var(--footbar-color);
    font-weight: bold;
    text-transform: uppercase;
    outline: none;
    border: none;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}

nav.bottom button::before {
    font-family: "Font Awesome 5 Pro";
    display: block;
    font-size: 2em;
    margin-bottom: 0.5em;
    color: var(--footbar-color-icon);
}

#button_registros::before {
    content: "\f737";
}

#button_demanda::before {
    content: '\f47b';
}

#button_viaje::before {
    content: '\f2f1';
}

#button_registros::after {
    content: 'Registros de entrega';
}

#button_demanda::after {
    content: 'Productos en demanda';
}

#button_viaje::after {
    content: 'Viaje';
}

.view {
    display: none;
    padding: 0.5em;
    flex-direction: column;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.view.active {
    display: flex;
    flex-direction: column;
    align-content: stretch;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: nowrap;
    height: calc(100vh - 8rem);
    overflow-y: scroll;
}

.view form {
    display: flex;
    flex-direction: column;

}

label {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1.5;
}

input,
select {
    padding: 1em;
    border-radius: 0.5em;
    margin-bottom: 1em;
}

button {
    padding: 1.5em;
    text-transform: uppercase;
    font-weight: bold;
    border-radius: 0.5em;
    width: 20em;
    margin-left: auto;
    margin-right: auto;
}

.error_message {
    color: var(--red);
    padding: 1em;
    animation: slideInDown;
    animation-duration: 1s;
}

/** Registros **/
table {
    border-collapse: collapse;
}

table tr td,
table tr th {
    border-bottom: 1px solid var(--border-table-registros);
    padding: 1em;
    vertical-align: top;
}

table tr th {
    text-align: left;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 1.5;
}

table small {
    color: #888;
}

#content_registro_demanda tr th:nth-child(1) {
    width: 70%;
}

#content_registro_demanda input.quantity {
    width: 4em;
}

.fas.fa-times-square {
    color: var(--red);
}

.fas.red::before, .fa.red:before {
    color: var(--red);
}

.big-icon {
    width: 100%;
    text-align:  center;
    font-size: 5em;
    margin-top: 0.25em;
    margin-bottom: 0.25em;
    color: var(--green);
}

/** Entregar **/
#codigo_interno {
    width: 12em;
}

#dni,
#rd_dni {
    width: 10em;
}

#digito_verificador {
    width: 3em;
}

#btn_registrar,
#btn_registrar_demanda {
    background: var(--green);
    color: var(--background);
    margin-top: 3em;
}



/** Sincronizar **/
#btn_iniciar_viaje {
    background: var(--green);
    color: var(--background);
    margin-top: 3em;
}

#btn_finalizar_viaje {
    background: var(--green);
    color: var(--background);
    margin-top: 3em;
}

#btn_abortar_viaje {
    background: var(--red);
    color: var(--background);
    margin-top: 3em;
}

/** Loading **/
#loading {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    background: var(--background);
    color: var(--color);
    z-index: 999;
    text-align: center;

}

#loading .message::before {
    display: block;
    content: ' ';
    height: 40vh;
    min-width: 40vw;
    background-image: url('../assets/newlogo_named.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.quickadd {
    position: absolute;
    right: 1em;
    bottom: 1em;
    border-radius: 50%;
    width: 4em;
    height: 4em;
    background: var(--green);
    color: var(--background);
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    border: none;
    outline: none;
    z-index: 5;
}

.quickadd::before {
    content: '\f067';
    font-family: "Font Awesome 5 Pro";
    font-size: 2em;
}



#digito_verificador_pendiente {
    color: var(--green);
    font-weight: bold;
}


#content_resumen label {
    display: inline-block;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    color: #888;
}

#content_resumen .data {
    font-size: 1.25em;
}

.punto_de_recorrido {
    position: relative;
}
.punto_de_recorrido.carga::after {
    content: 'Carga';
    display: block;
    width:fit-content;
    margin-top:0.5em;
    text-transform: uppercase;
    font-size: 0.7em;
    color:#faa;
    border: 1px solid #faa;
    padding:0.25em;
    border-radius: 0.5em;
}

.punto_de_recorrido.descarga::after {
    content: 'Descarga';
    display: block;
    width: fit-content;
    margin-top: 0.5em;
    text-transform: uppercase;
    font-size: 0.7em;
    color: #afa;
    border: 1px solid #afa;
    padding: 0.25em;
    border-radius: 0.5em;
}