@import url('normalize.css');

html {
  scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

body {
    background-color: rgb(27, 38, 44);
    overflow-x: hidden;
    position: relative;
    z-index: 0;
}

/* BARRA DE NAVEGAÇÃO */
.navbar {
    white-space: nowrap;
    background-color: rgb(27, 38, 44);
    position: relative;
    z-index: 100;
    top: 0%;
    height: 4rem;
    width: 100%;
    border-bottom: 2px solid white;
    border-radius: 0px;
    box-shadow: 0 0 15px rgba(212,239,238,0.1), inset 0 0 10px rgba(1,1,1,0.5);
    margin-bottom: 2%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transform: translate3d(0,0,0); /* Cria novo contexto de empilhamento */
    will-change: transform; /* Otimização */
}

/* Ajustes para os itens da navbar */
.w3-bar-item.w3-button {
    height: 4rem;
    display: inline-flex; /* Mudamos para inline-flex */
    align-items: center;
    color: rgb(79,119,141);
    transition: color 0.3s ease;
    padding: 0 15px;
    margin: 0; /* Removemos a margem */
    width: auto !important; /* Força a largura automática */
    white-space: nowrap; /* Impede quebra de linha */
    padding-right: 2vw;
    background-color: transparent;
}

.w3-bar-item.w3-button:hover {
    color: white !important;
    background-color: transparent !important;
}

/* Ajuste para o logo */
.w3-bar-item.w3-button.w3-wide {
    color: white !important;
    font-weight: bold;
    font-size: 1.5rem;
}

.w3-teal {
    background-color: rgb(59,177,127) !important;
}

.row-custom {
    display: flex;
    gap: 1rem; /* espaço entre as colunas */
}

.third {
    flex: 1;           /* equivale a 1 parte */
    max-width: 33.333%;
}

.twothirds {
    flex: 2;           /* equivale a 2 partes */
    max-width: 66.666%;
}

/* Container central para os itens - DESKTOP */
.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: nowrap; /* Impede quebra de linha */
    white-space: nowrap; /* Impede quebra de texto */
}

/* Ajuste para a data */
.text-date {
    margin-left: 10px;
}

/* Logo - sempre à esquerda */
.nav-logo {
    position: relative; 
    z-index: 1;
    margin-right: auto; 
}

/* Aplica SOMENTE à sidebar mobile (não afeta desktop) */
.w3-sidebar.w3-bar-block {
    display: none; /* Inicialmente escondido */
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px !important;
    z-index: 200;
    background-color: rgb(27, 38, 44) !important;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0,0,0,0.5);
}

/* Ajustes para telas em paisagem */
@media (max-width: 1323px) and (orientation: landscape) {
    .w3-sidebar.w3-bar-block {
        width: 200px !important;
    }
    
    .w3-sidebar .w3-bar-item {
        padding: 12px 16px !important;
    }
}

/* Telas muito pequenas em paisagem */
@media (max-width: 600px) and (orientation: landscape) {
    .w3-sidebar.w3-bar-block {
        width: 180px !important;
    }
}

/* Itens do menu mobile */
.w3-sidebar .w3-bar-item {
    width: 100% !important;
    display: block !important;
    text-align: left !important;
    padding: 15px 20px !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(212, 239, 238, 0.2) !important;
    color: rgb(212, 239, 238) !important;
    white-space: normal !important;
}

/* Botão de fechar (X) */
.w3-sidebar .w3-bar-item.w3-button.w3-large {
    text-align: right !important;
    font-size: 28px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid rgba(212, 239, 238, 0.5) !important;
}

/* Efeito hover mobile */
.w3-sidebar .w3-bar-item:hover {
    background-color: rgba(212, 239, 238, 0.1) !important;
}

/* MOBILE - Esconde o menu centralizado */
@media (max-width: 1323px) {
    .w3-sidebar.w3-bar-block {
        width: 100% !important;
    }

    .nav-center {
        display: none !important;
    }

    .graph-ticks-block {
        display: none !important;
    }
    
    /* Mostra botão menu mobile APENAS no mobile */
    .mobile-menu-btn {
        display: block !important;
    }

    #nt-var {
        display: none !important;
    }

    .variable-group-mobile {
        display: block !important;
    }

    .left-side {
        display: none !important;
    }
}

/* DESKTOP - Esconde botão menu */
@media (min-width: 1324px) {
    .mobile-menu-btn {
        display: none !important;
    }

    #nt-var {
        display: block !important;
    }

    .variable-group-mobile {
        display: none !important;
    }

    .left-side {
        display: flex !important;
    }
}

/* Estilo do botão mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 15px;
    height: 3rem;
    margin-left: auto; /* Posiciona à direita */
}

.navbar-nav {
    background-color: transparent;
}

.navbar-nav .nav-link {
    background-color: transparent;
    color: rgb(79,119,141) !important;
    cursor: pointer !important;
}

.nav-link-2 {
    background-color: transparent;
    color: rgb(79,119,141);
    cursor: pointer;
    padding-right: 5vw;
}

.navbar-nav .nav-link:hover {
    color: white;
}

.w3-bar-item:active {
    font-weight: bold;
    color: rgb(212, 239, 238) !important;
}

.navbar-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-align: center;
    margin: 0 auto;
    position: relative;
    left: -30%;
    padding-left: 6rem;
}

.container-fluid {
    padding-left: 0px;
    left: 0%;
    justify-content: space-between;
}

.config-btn{
    display: flex;
    height: 50px;
    width: 50px;
    border-color: transparent;
    background-color: transparent;
    justify-content: center;
    margin-left: 10px;
}

.config-btn:hover{
    background-image: url('/images/engrenagem_hover.png');
    background-color: transparent;
    color: transparent;
    border-color: transparent;
}

.engrenagem-img {
    height: 65%;
    width: 65%;
    position: relative;
}

.engrenagem-img:hover {
    height: 75%;
    width: 75%;
    position: relative;
}

/* VISUALIZAÇÃO DE TANQUES */

.w3-light-grey {
    background-color: rgb(27, 38, 44) !important;
}

/* CONTAINER DE COLUNAS */

.columns-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    justify-content: center;
    gap: 40px;
    margin: 20px auto;
    max-width: 1350px;
    width: 100%;
    position: relative;
}

.tank-columns-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    padding: 20px;
    justify-content: space-around;
    margin-top: 5px;
    margin-left: 300px;
    margin-right: 300px;
}

/* WRAPPERS ESQUERDA, CENTRAL E DIREITA */

.visualizations-wrapper-left,
.visualizations-wrapper-center,
.visualizations-wrapper-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.visualizations-wrapper-right {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.visualizations-wrapper-center{
    justify-content: space-between;
}


/* --------------- BLOCOS DE BÚSSOLA --------------- */

.compass-block {
    background-color: #394850;
    padding: 3%;
    border-radius: 10px;
    text-align: left;
    border: 2px solid white;
    box-shadow: 0 0 15px rgba(212,239,238,0.1), inset 0 0 100px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 1rem;
}

.compass-title {
    color: white;
    margin-bottom: 10px;
    margin-left: 5px;
    font-size: 22px;
    font-family: 'Helvetica', Courier, monospace;
    transform: uppercase;
}

.compass-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    width: 100%; 
}

.pitch-roll-compass-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.5rem;
    width: 100%; 
}

.compass-container {
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.3); 
    position: relative;
    background-color: rgb(27, 38, 44);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: auto !important; /* Remove qualquer z-index herdado */
    transform: none; /* Remove transformações que criam contextos */
    opacity: 1; /* Garante que não haja contextos desnecessários */
    isolation: isolate; /* Isola o contexto interno */
}

.compass {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.compass::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    opacity: 1;
    z-index: 0;
}

.arrow-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 2;
}

/* --------------- BÚSSOLA DE DIREÇÃO DO VENTO --------------- */

.wind-compass-container {
    position: relative;
    width: 60%; 
    max-width: 300px; 
    height: auto;
    aspect-ratio: 1/1;
    background-color: rgb(27, 38, 44);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto; 
}

.wind-compass-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    height: 280px;
}

.wind-compass::before {
    background-image: url('/images/CirculoWind-Branco.png');
}

.wind-compass-center {
    position: absolute;
    width: 65%;
    height: 65%;
    object-fit: cover;
    z-index: 1;
}

.wind-compass-text {
    position: absolute;
    color: white;
    font-size: 1em;
    font-weight: bold;
    z-index: 2;
}

.wind-arrow {
    width: 5%;
    height: 13%;
    background-color: white;
    transform-origin: center bottom;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    position: absolute;
    transform: rotate(180deg);
    top: -15%;
}

.compass-directions {
  position: absolute;
  width: 125%;   /* aumentei um pouco para caber a borda */
  height: 125%;
  border-radius: 50%;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
  transform: rotate(0deg); /* controlado pelo JS */
  background-color: rgba(0, 0, 0, 0.2); /* fundo translúcido */
  border: 2px solid #ffffff;            /* borda branca */
  box-shadow: 0 0 10px rgba(0,0,0,0.6); /* brilho externo */
  z-index: -1;
}


.compass-directions .dir {
  position: absolute;
  font-size: 0.9em;
  font-weight: bold;
  color: #ffffff;
  text-transform: uppercase;
}

/* principais maiores */
.compass-directions .dir.main {
  font-size: 1.2em;   /* destaque para N, E, S, W */
}

/* diagonais menores */
.compass-directions .dir:not(.main) {
  font-size: 0.85em; /* um pouco menor que o padrão */
}

/* posicionamento das letras no círculo */
.dir.n  { top: 0; left: 50%; transform: translateX(-50%); }
.dir.s  { bottom: 0; left: 50%; transform: translateX(-50%) rotate(180deg); }
.dir.e  { right: 2.5%; top: 50%; transform: translateY(-50%) rotate(90deg); }
.dir.w  { left: 2%; top: 50%; transform: translateY(-50%) rotate(-90deg); }

/* diagonais reposicionadas mas sem rotação no texto */
.dir.ne { top: 18%; right: 18%; transform: translate(50%, -50%) rotate(45deg); }
.dir.se { bottom: 18%; right: 18%; transform: translate(50%, 50%) rotate(135deg); }
.dir.sw { bottom: 18%; left: 18%; transform: translate(-50%, 50%) rotate(225deg); }
.dir.nw { top: 18%; left: 18%; transform: translate(-50%, -50%) rotate(315deg); }

/* --------------- DATA E HORA --------------- */

#box-date{
    overflow: visible;
}

#navbarDate {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px; 
    position: relative; 
    color: white;
    font-size: 20px;
}

#navbarDate:hover {
    color: rgb(119, 237, 187);
    text-decoration: underline;
}

/* Estilos para o popup */

.config-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgb(27, 38, 44);
    padding: 2em;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border: 2px, solid, white;
    border-radius: 2px;
    border-color: white;
    box-shadow: 0 0 50px white;
}

.config-popup input[type="datetime-local"] {
    margin-top: 1rem;
    width: 17rem;
    box-sizing: border-box;
}

.config-popup input[disabled] {
    opacity: 0.6;
    pointer-events: none;
}

.popup-content {
    width: 21em;
    text-align: center;
    color: white;
}

.suporte-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgb(27, 38, 44);
    padding: 1em;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border: 2px, solid, white;
    border-radius: 2px;
    border-color: white;
    box-shadow: 0 0 50px white;
}

#btnSave{
    background-color: rgb(2,101,168);
}

#btnSave:hover{
    background-color: white;
}

/* --------------- BARRA DE ROT --------------- */

.rot-title {
    position: relative;
    text-align: center;
    color: white;
    margin-bottom: 5px;
    margin-left: 5px;
    font-size: 22px;
    font-family: 'Helvetica', Courier, monospace;
    transform: uppercase;
}

 .rot-container {
    position: relative;
    width: 100%;
    height: 40px; /* Aumentei a altura para acomodar as barrinhas */
    margin: 0 auto;
    background-color: rgba(57, 72, 80, 0.5);
    border-radius: 0px;
    overflow: visible;
    border-bottom: 1px solid white;
    border-top: 1px solid white;
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.3), inset 0 0 1rem rgba(59, 177, 127, 0.4); 
}

.rot-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: rgb(119, 237, 187);
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.8); 
    transition: left 0.1s ease-in-out;
}

.pointer-triangle{
    position: absolute;
    top: -17px;
    left: -6px;
    color: rgb(119, 237, 187);
    transition: left 0.1s ease-in-out;
}

.rot-value{
    color: ciano;
    bottom: 100%;
    position: relative;
    left: 0%;
    font-family: 'Helvetica', Courier, monospace;
}

.rot-container::before,
.rot-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    background-color: #333;
}

.rot-container::before {
    left: 0;
}

.rot-container::after {
    right: 0;
}

/* Criação das barrinhas como uma régua */

.rot-tick-mark {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: white;
}

.rot-tick-mark-bot {
    position: absolute;
    bottom: 0;
    width: 2px;
    height: 100%;
    background-color: white;
}

.rot-container .small-tick {
    height: 25%; /* Barras menores */
    background: linear-gradient(to bottom, white 50%, transparent 50%);
}

.rot-container .small-bot-tick {
    height: 25%; /* Barras menores */
    background: linear-gradient(to top, white 50%, transparent 50%);
}

.rot-container .large-tick {
    height: 25%; /* Barras maiores */
} 

/* Distribui as barrinhas ao longo da barra de ROT */
.rot-container .rot-tick-mark:nth-child(1)  { left: 0%; }
.rot-container .rot-tick-mark:nth-child(2)  { left: 5%; }
.rot-container .rot-tick-mark:nth-child(3)  { left: 10%; }
.rot-container .rot-tick-mark:nth-child(4)  { left: 15%; }
.rot-container .rot-tick-mark:nth-child(5)  { left: 20%; }
.rot-container .rot-tick-mark:nth-child(6)  { left: 25%; }
.rot-container .rot-tick-mark:nth-child(7)  { left: 30%; }
.rot-container .rot-tick-mark:nth-child(8)  { left: 35%; }
.rot-container .rot-tick-mark:nth-child(9)  { left: 40%; }
.rot-container .rot-tick-mark:nth-child(10) { left: 45%; }
.rot-container .rot-tick-mark:nth-child(11) { left: 50%; }
.rot-container .rot-tick-mark:nth-child(12) { left: 55%; }
.rot-container .rot-tick-mark:nth-child(13) { left: 60%; }
.rot-container .rot-tick-mark:nth-child(14) { left: 65%; }
.rot-container .rot-tick-mark:nth-child(15) { left: 70%; }
.rot-container .rot-tick-mark:nth-child(16) { left: 75%; }
.rot-container .rot-tick-mark:nth-child(17) { left: 80%; }
.rot-container .rot-tick-mark:nth-child(18) { left: 85%; }
.rot-container .rot-tick-mark:nth-child(19) { left: 90%; }
.rot-container .rot-tick-mark:nth-child(20) { left: 95%; }
.rot-container .rot-tick-mark:nth-child(21) { right: 0%; }

.rot-container .rot-tick-mark-bot:nth-child(22) { left: 0%; }
.rot-container .rot-tick-mark-bot:nth-child(23) { left: 5%; }
.rot-container .rot-tick-mark-bot:nth-child(24) { left: 10%; }
.rot-container .rot-tick-mark-bot:nth-child(25) { left: 15%; }
.rot-container .rot-tick-mark-bot:nth-child(26) { left: 20%; }
.rot-container .rot-tick-mark-bot:nth-child(27) { left: 25%; }
.rot-container .rot-tick-mark-bot:nth-child(28) { left: 30%; }
.rot-container .rot-tick-mark-bot:nth-child(29) { left: 35%; }
.rot-container .rot-tick-mark-bot:nth-child(30) { left: 40%; }
.rot-container .rot-tick-mark-bot:nth-child(31) { left: 45%; }
.rot-container .rot-tick-mark-bot:nth-child(32) { left: 50%; }
.rot-container .rot-tick-mark-bot:nth-child(33) { left: 55%; }
.rot-container .rot-tick-mark-bot:nth-child(34) { left: 60%; }
.rot-container .rot-tick-mark-bot:nth-child(35) { left: 65%; }
.rot-container .rot-tick-mark-bot:nth-child(36) { left: 70%; }
.rot-container .rot-tick-mark-bot:nth-child(37) { left: 75%; }
.rot-container .rot-tick-mark-bot:nth-child(38) { left: 80%; }
.rot-container .rot-tick-mark-bot:nth-child(39) { left: 85%; }
.rot-container .rot-tick-mark-bot:nth-child(40) { left: 90%; }
.rot-container .rot-tick-mark-bot:nth-child(41) { left: 95%; }
.rot-container .rot-tick-mark-bot:nth-child(42) { right: 0%; }

/* Configura a fonte dos números da barra do ROT */

.rot-ticks {
    position: relative;
    top: 80%;
    color: white;
    font-family: 'Helvetica', Courier, monospace;
    font-size: 14px; /* Ajuste o tamanho da fonte conforme necessário */
    left: -350%;
}

#num-100 {
    position: relative;
    left: -525%;
}

#num0 {
    position: relative;
    font-family: 'Helvetica', Courier, monospace;
    left: -125%;
}

#num100 {
    position: relative;
    font-family: 'Helvetica', Courier, monospace;
    left: -525%;
}

/* --------------- ROTAÇÃO DOS MOTORES --------------- */

#textRPM {
    position: absolute;
    top: -30px;
    color: white;
    font-family: 'Helvetica', Courier, monospace;
    white-space: nowrap;
}

/* --------------- MAIS INFORMAÇÕES NO CANTO SUPERIOR DIREITO (LAT, LON, COG, SOG) --------------- */

.upright-title{
    color: white;
    margin-bottom: 10px;
    margin-left: 0px;
    font-size: 22px;
    font-family: 'Helvetica', Courier, monospace;
    transform: uppercase;
}

.upright-results{
    float: right;
    color: white;
    margin-bottom: 10px;
    margin-left: 0px;
    font-size: 22px;
    font-family: 'Helvetica', Courier, monospace;
    transform: uppercase;
}

/* --------------- BÚSSOLA DE PITCH --------------- */

.pitch-roll {
    display: flex;
    justify-content: space-between;
}

.pitch-compass-container {
    position: relative;
    width: 100%; 
    max-width: 300px; 
    height: auto;
    aspect-ratio: 1/1;
    background-color: rgb(27, 38, 44);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto; 
}

.pitch-compass::before {
    background-image: url('/images/CirculoPitch-Branco.png');
}

.pitch-compass-center {
    position: absolute;
    width: 40%;
    height: 40%;
    object-fit: cover;
    z-index: 1;
    align-items: center;
}

.pitch-compass-text {
    position: absolute;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    z-index: 2;
    bottom: 10px;
    top: unset;
}

.pitch-arrow-container {
    align-items: center;
}

.pitch-arrow {
    width: 5%;
    height: 15%;
    background-color: white;
    transform-origin: center bottom;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    position: absolute;
    top: -10%;
}

/* --------------- BÚSSOLA DE ROLL --------------- */

.roll-compass-container {
    position: relative;
    width: 100%; 
    max-width: 300px; 
    height: auto;
    aspect-ratio: 1/1;
    background-color: rgb(27, 38, 44);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto; 
}

.roll-compass::before {
    background-image: url('/images/CirculoRoll-Branco.png');
}

.roll-compass-center {
    position: absolute;
    width: 40%;
    height: 40%;
    object-fit: cover;
    z-index: 1;
    align-items: center;
}

.roll-compass-text {
    position: absolute;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    z-index: 2;
    bottom: 10px;
    top: unset;
}

.roll-arrow-container {
    align-items: flex-end;
}

.roll-arrow {
    width: 5%;
    height: 15%;
    background-color: white;
    transform-origin: center bottom;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    position: absolute;
    top: -10%;
}

/* --------------- BÚSSOLA DE HEADING --------------- */

.heading-info {
    display: flex;
    justify-content: space-between;
}

.motores-info {
    margin-top: 4%;
    margin-bottom: 2%;
    display: flex;
    justify-content: space-evenly;
}

.heading-compass-container {
    position: relative;
    width: 70%; /* Alterado de 20em para 100% */
    max-width: 300px; /* Tamanho máximo */
    height: auto;
    aspect-ratio: 1/1; /* Mantém proporção quadrada */
    background-color: rgb(27, 38, 44);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto; /* Centraliza horizontalmente */
    contain: layout paint;
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.3); 
}

.heading-compass::before {
    background-image: url('/images/Bussola-Branco.png');
}

.heading-compass-center {
    position: absolute;
    width: 65%;
    height: 65%;
    object-fit: cover;
    z-index: 1;
    align-items: center;
}

.heading-compass-text {
    position: absolute;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    z-index: 2;
    bottom: 10px;
    top: unset;
}

/* --------------- TANQUES --------------- */

#Tanques {
    scroll-margin-top: 80px;
  }

.tank-name {
    font-family: 'Helvetica', Courier, monospace;
}

.tank-name:hover {
    cursor: pointer;
    color: rgb(119, 237, 187);
    text-decoration: underline;
}

.tank-container {
    width: 150px;
    height: 500px;
    border: 4px solid white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2), inset 0 0 100px rgba(0,0,0,0.5);
    border-radius: 10px;
    position: relative;
    background-color: transparent;
}

/* Container do nível do tanque */
.tank-level-container {
    position: relative;
    height: 1.5rem; 
    width: 100%;
    overflow: hidden; /* Garante que o conteúdo não vaze */
}

.tank-level-container:hover {
    cursor: pointer;
    box-shadow: 0 0 10px rgba(119, 237, 187, 0.5), inset 0 0 100px rgba(119, 237, 187, 0.2); 
}

/* Barra de preenchimento */
.tank-fill {
    position: absolute;
    height: 100%; /* Sempre 100% da altura do container */
    top: 0;
    left: 0;
    border-radius: 12px; /* Metade da altura para manter o round-xlarge */
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(to right, rgb(59, 177, 127), rgb(119, 237, 187));
    height: 100%;
    width: 0;
    transition: width 0.5s ease;
    box-shadow: inset 0 0 1% rgba(0,0,0,0.2);
}

/* Texto de porcentagem */
.tank-volume-text {
    position: absolute;
    padding: 2px;
    width: 100%; /* Ocupa toda a largura */
    text-align: center; /* Centraliza o texto horizontalmente */
    top: 50%; /* Posiciona no meio vertical */
    transform: translateY(-50%); /* Ajuste fino vertical */
    z-index: auto !important;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
    left: 0; /* Alinhamento horizontal corrigido */
}

.tank-volume-text:hover {
    font-size: 16px;
}

.tank-scale {
    position: absolute;
    top: 0;
    height: 100%;
    width: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tank-scale div {
    height: 0;
    border-top: 1px solid white;
    text-align: right;
    font-size: 12px;
    color: white;
}

.tank-scale div:first-child {
    border: none;
}

/* Cada bloco tanque (nome + barra) */
.nt-variable-box {
    padding: 4px 0; 
}

/* Nome do tanque */
.nt-tank-name {
    margin: 0 0 4px 0;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Helvetica', Courier, monospace;
    color: white;
}

/* Container da barra */
.nt-tank-level-container {
    position: relative;
    height: 23px;
    margin-bottom: 5px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(212,239,238,0.1), inset 0 0 100px rgba(0, 0, 0, 0.2);
}

/* Barra de preenchimento */
.nt-tank-fill {
    height: 100%;
    border-radius: 1rem;
    transition: width 0.5s ease;
}

/* Texto dentro da barra */
.nt-tank-volume-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 3px rgba(0,0,0,0.7);
}


/* BLOCO CENTRALIZADO PARA O TANQUE E GRÁFICO */
.central-block {
    background-color: #394850;
    padding: 3%;
    padding-bottom: 6%;
    border-radius: 10px;
    justify-content: center;
    gap: 20px;
    overflow: hidden;
    position: relative;
    border: 2px solid white;
    box-shadow: 0 0 15px rgba(212,239,238,0.1), inset 0 0 100px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.navbar-space {
    padding-top: 4rem;
}

/* BLOCO CENTRALIZADO PARA O TANQUE E GRÁFICO */
.title-block {
    background-color: #394850;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alinha os itens ao topo */
    overflow: visible;
    position: relative;
    border: 2px solid white;
    margin-bottom: 1rem;
}

.title-block-title {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
    font-size: 2rem !important;
    color: white;
    background-color: transparent;
    border-color: transparent;
    cursor: pointer;
    text-decoration: none;
}

.central-block-title {
    position: relative;
    top: 1%; /* Ajuste conforme necessário para a posição desejada */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 2rem;
    color: white;
    background-color: transparent;
    border-color: transparent;
    cursor: pointer;
}

.central-block-title option {
    background-color: rgb(27, 38, 44); /* Cor de fundo de cada item */
    color: white; /* Cor do texto de cada item */
}

.central-block-title option:hover {
    background-color: rgb(59,177,127); /* Cor de fundo ao passar o mouse */
    color: #BBE1FA; /* Cor do texto ao passar o mouse */
}

/* TANQUE E GRÁFICO DENTRO DO BLOCO CENTRALIZADO */
.tank-display,
.graph-container {
    flex: 1;
}

/* Estilos para o gráfico */
.chart-container {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
    height: 27rem;
}

/* Estilos para o seletor de tempo */
.chart-time-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1%;
    margin-bottom: 1%;
}

.time-arrow {
    background-color: rgb(59,177,127);
    color: white;
    border: 1px solid white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    margin: 0 10px;
}

.time-frame {
    color: white;
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
}

.time-frame:hover {
    color: rgb(119, 237, 187);
    text-decoration: underline;
}

.tank-display {
    display: flex;
    justify-content: left;
}

.graph-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: right;
    padding: 1%;
}

.graph-header-block {
    display: flex;
    justify-content: right;
    width: 100%;
    position: relative;
}

.graph-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1%;
    flex-grow: 1;
}

.graph-ticks-block {
    margin-bottom: 1%;
    margin-right: 1%;
    position: absolute;
    text-align: right;
    color: white;
}

#tank-graph {
    width: 100%;
    height: 100%;
}

#engine-graph {
    width: 100%;
    height: 100%;
}

#y-axis-variable, #y-axis-variable-engines {
    font-size: 20px;
    font-weight: bold;
    color: white;
    margin-left: 1%;
    margin-right: 1%;
}

.info-display-container {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espaçamento entre os blocos */
    margin-top: -15px;
    align-items: center; /* Centraliza as informações */
}

.tank-info-display-container {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espaçamento entre os blocos */
    margin-top: 15px;
    align-items: center; /* Centraliza as informações */
}

.info-display {
    display: flex;
    justify-content: space-between; /* Para ajustar o conteúdo dentro de cada bloco */
    padding: 5px;
    background-color: rgb(27, 38, 44); /* Exemplo de cor de fundo */
    border: 1px solid white;
    border-radius: 5px;
    color: white; /* Cor do texto */
}

.info-item {
    font-size: 1em;
    text-align: center;
    display: block; /* Garante que o conteúdo do item seja exibido em bloco */
    min-width: 10rem;
}

/* --------------- LOGIN --------------- */

/* Dividindo a tela ao meio */
.container-split {
    display: flex;
    height: 100vh;
}

/* Lado esquerdo com background color */
.left-side {
    background-color: rgb(212, 239, 238);
    flex: 1;
    display: flex;
    align-items: bottom;
    justify-content: right;
}

/* Lado direito, mantendo o conteúdo */
.right-side {
    background-color: white;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos do login */
.login-container {
    background-color: rgb(2, 101, 168);
    border: 1px solid rgb(212, 239, 238);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
    padding: 2rem;
    padding-top: 1.5rem;
    width: 25em; 
    height: auto; 
    margin:auto;
    top: 50%;
    text-align: center;
}

/* Garantindo que os itens não alterem de tamanho */
.login-box {
    position: relative;
    font-size: 1rem; /* Unidades relativas */
}

h2 {
    color: white;
    margin-bottom: 1.5rem;
}

form {
    display: flex;
    flex-direction: column;
}

input {
    background-color: white;
    border: 0.1rem solid rgb(212, 239, 238);
    border-radius: 0.25rem;
    color: black;
    font-size: 1rem; /* Unidades relativas */
    margin-bottom: 1.25rem;
    padding: 0.75rem;
}

input::placeholder {
    font-style: italic;
    color: gray;
}

button {
    background-color: rgb(2, 101, 168);
    border: 0.1rem solid rgb(212, 239, 238);
    border-radius: 0.25rem;
    color: white;
    cursor: pointer;
    font-size: 1.125rem; /* Unidades relativas */
    padding: 0.75rem;
}

button:hover {
    background-color: rgb(212, 239, 238);
    color: rgb(27, 38, 44);
    border-color: rgb(27, 38, 44);
}

.falhaLogin {
    color: #B83332;
    position: absolute;
    text-align: center;
    left: 50%;
    top: 80%;
    margin-top: 20px;
    transform: translateX(-50%);
}

.texto-criar-usuario {
    cursor: pointer;
    color: rgb(212, 239, 238);
}

.texto-criar-usuario:hover {
    text-decoration: underline;
}

/* Estilo customizado para o checkbox */
.custom-checkbox {
    display: flex;
    align-items: top;
    cursor: pointer;
    color: white;
    font-size: 1rem;
    user-select: none;
}

.custom-checkbox input[type="checkbox"] {
    appearance: none;
    background-color: transparent;
    border: 0.125rem solid white;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    margin-right: 0.625rem;
    position: relative;
    cursor: pointer;
}

.custom-checkbox input[type="checkbox"]:checked {
    background-color: white;
}

.custom-checkbox input[type="checkbox"]:checked:before {
    content: '✔';
    position: absolute;
    left: 0.125rem;
    font-size: 1rem;
    color: rgb(2, 101, 168);
}

.checkbox-text {
    color: white;
    margin-left: 0.25rem;
    font-style: italic;
    margin-top: 0.1rem;
}

/* Estilizando a imagem do banner */
.banner {
    width: 47%;
    height: auto;
    position: fixed;
    bottom: 0%;
    object-fit: contain;
    display: block;
}

.logo {
    width: 50%;
    position: relative;
    transform: translateX(-50%);
    left: 25%;
}

/* Estilos para o campo de senha com o botão de visibilidade */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input {
    width: 100%;
    padding-right: 2.5rem; /* Espaço para o botão de ver senha */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 9px;
    width: 25px;
    height: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
}

.toggle-password img {
    width: 25px; /* Ajusta o tamanho do ícone */
    height: 25px;
}

.toggle-password:hover img {
    opacity: 0.7;
}


/* --------------- MOTORES --------------- */

#Motores {
    scroll-margin-top: 100px;
  }

  .motor-compass {
    position: relative;
    width: 150px;
    height: 150px;
    background-image: url('/images/Gauge-Branco.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(27, 38, 44);
    border: 5px solid white;
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.3); 
}

.motor-compass-container {
    display: flex;
    gap: 40px;
    padding:5px;
}

.motor-compass-center {
    position: absolute;
    width: 70%;
    height: 70%;
    object-fit: cover;
    z-index: auto !important;
}

.motor-compass-text {
    position: absolute;
    color: white;
    font-size: 1em;
    font-weight: bold;
    z-index: auto !important;
    bottom: 10px;
    top: unset;
    font-family: 'Helvetica', Courier, monospace;}

.motor-span {
    position: relative;
    top: -90px;
    color: white;
    font-family: 'Helvetica', Courier, monospace;
}

/* SETAS LATERAIS PARA ALTERNAÇÃO DOS MOTORES E TANQUES */

.motor-arrow-container,
.tank-arrow-container {
    display: flex;
    justify-content: space-between;
    pointer-events: none; /* Permite que os cliques atravessem o contêiner */
}

.motor-arrow,
.tank-arrow {
    background-image: radial-gradient(rgb(62,161,228), rgb(2,101,168));
    color: white;
    border: 1px solid white;
    cursor: pointer;
    padding: 1% 2%;
    pointer-events: all; /* Permite que os botões recebam cliques */
    z-index: 100;
    font-size: 2rem;
    color: #bce2fa;
}

.motor-arrow:hover,
.tank-arrow:hover {
    background-image: radial-gradient(rgb(2,101,168),rgb(62,161,228));
}

/* --------------- ALARMES --------------- */

.alarm-table {
    max-width: 1350px;
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 0 15px rgba(212,239,238,0.1), inset 0 0 100px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.alarm-table th, .alarm-table td {
    padding: 12px;
    border: 2px solid white;
    text-align: left;
    cursor: pointer;
    color: white;
}

.alarm-table th {
    background-color: #394850;
    color: white;
}

.alarm-table tbody tr:hover {
    background-color: #394850;
    color: white;
    cursor: pointer;
}

.alarm-table tbody tr:active {
    background-color: #394850;
    color: white;
}

.download-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.texto-clicavel {
    color:rgb(59,177,127);
    text-decoration: underline;
    text-align: center;
    cursor: pointer;
}

.texto-clicavel:hover {
    color:white;
}

#loadingOverlay {
    position: fixed;
    top: -10%;
    left: 0;
    width: 100%;
    height: 110%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    color: white;
}

#page-info, #page-info-consumo {
    color: white;
    padding-bottom: 30px;
}

#loadingOverlay img {
    max-width: 250px; /* Ajuste o tamanho conforme necessário */
    max-height: 250px;
    z-index: 10000; /* Garante que a imagem fique na frente */
}

#pagination, #pagination-consumo {
    text-align: center;
    margin-bottom: 1rem;
}

#filter-container {
    margin: 10px 0;
    text-align: center;
}

#filter {
    padding: 5px;
    font-size: 16px;
}

#alarm-container {
    display: flex;
    position: relative;
}

#TabelaAlarmes {
    overflow-x:auto;
    flex: 1;
}

#button-overlay {
    width: 50px; /* Ajuste conforme necessário */
    position: absolute;
    top: 0;
    right: 0;
}

.notification-dot {
    width: 12px; 
    height: 12px;
    background-color: #e05c43;
    border-radius: 50%;
    position: absolute;
    top: 0; 
    right: -8px; /* Ajuste para posicionar no canto superior direito */
    display: none; /* Inicialmente escondido */
    border: 2px solid #394850; /* Para criar o efeito de contorno */
}

.nav-link.position-relative {
    position: relative;
}


/* --------------- PopUp Exportação --------------- */

#intervalTimeUnit {
    background-color: #4F778D;
    border: 1px solid white;
    border-radius: 4px;
    color: white;
    font-size: 16px;
    margin-bottom: 20px;
    padding: 10px;
    text-align: left;
    cursor: pointer;
}

#intervalTimeInput {
    width: 100px;
}

#btnSelect{
    background-color: rgb(59,177,127);
}

#btnSelect:hover{
    background-color: white;
}

.popup-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.nav-button {
    background-color: rgba(212,239,238,0.5);
    border: 1px solid white;
    padding: 10px 20px;
    cursor: pointer;
}

.nav-button:active {
    background-color: rgba(212,239,238,0.2) !important;
}

.nav-button-o {
    background-color: rgba(212,239,238,0.5);
    border: 1px solid white;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 0.25rem;
    color: white;
    font-size: 1.125rem; /* Unidades relativas */
    text-decoration: none;
}

.nav-button-o:hover {
    background-color: rgb(212, 239, 238);
    color: rgb(27, 38, 44);
    border-color: rgb(27, 38, 44);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.alarm-table-popup {
    width: 100%;
    border-collapse: collapse;
}

.alarm-table-popup th, .alarm-table-popup td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

#alarm-body-popup {
    max-height: 200px; 
    overflow-y: auto; 
    display: block; 
}
.alarm-row {
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.alarm-row:hover {
    background-color: rgba(212,239,238,0.2);
}
.alarm-row.selected {
    background-color: rgba(212,239,238,0.5);
}
.alarm-row.anomalia {
    background-color: #40372C;
}
.alarm-row.anomalia:hover {
    background-color: #80786E;
}

.alarm-table-popup tbody {
    display: block;
}
.alarm-table-popup thead, .alarm-table-popup tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.ship-list {
    margin-top: 1rem;
    border-width: 2px;
    border: 3px solid white;
    border-radius: 10px;
    padding: 2rem;
    width: 70%;
    min-width: 25rem;
    position: relative;
    /* Centralizar horizontalmente a .ship-list na tela */
    margin-left: auto;
    margin-right: auto;
    /* Centralizar o conteúdo dentro da .ship-list */
    display: flex;
    flex-direction: column; /* Itens empilhados verticalmente */
    align-items: center; /* Centraliza horizontalmente os itens */
    justify-content: center; /* Centraliza verticalmente os itens */
    z-index: 0;
    box-shadow: 0 0 25px rgba(212,239,238, 0.5), inset 0 3px 100px rgba(0, 0, 0, 0.5);
}

.ship-list:hover{
    background-color: #394850;
    cursor: pointer;
    box-shadow: 0 3px 100px rgba(0, 0, 0, 0.5), inset 0 0 25px rgba(212,239,238, 0.5);
}

/* Título */
.title {
    display: flex;
    text-align: left;
    color: white;
    margin-bottom: 13px;
    font-size: 1.4rem;
}

/* Cada grupo de variáveis */
#variaveis-navio #variaveis-navio-2 {
    display: flex;
    justify-content: space-between;
    width: 100%; /* Tamanho do grupo */
}

.variable-group-mobile {
    width: 100%;
}
  
.variable-box {
    width: calc(25% - 15px);
    border-radius: 10px;
    padding: 0;
    color: white;
    border: 2px solid white;
    position: relative;
    overflow: hidden;
    display: flex;           /* Flexbox para centralizar */
    flex-direction: column;  /* Mantém o conteúdo empilhado verticalmente */
    justify-content: center; /* Centraliza verticalmente o conteúdo */
    align-items: center;     /* Centraliza horizontalmente o conteúdo */
    text-align: center;      /* Centraliza o texto dentro da box */
    box-shadow: 0 0 5px rgba(212,239,238, 0.5), inset 0 3px 10px rgba(0, 0, 0, 0.5);
}

.variable-box-content {
    position: relative;
    z-index: 2;
    padding: 10px;
    color: white;
    font-size: 1rem;   /* Tamanho da fonte para conteúdo regular */
}

/* Cada linha de variável */
.nt-var-box {
    display: flex;
    justify-content: space-between; /* nome à esquerda, valor à direita */
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1); /* linha sutil separadora */
    margin: 1rem;
}

/* Nome da variável */
.nt-var-name {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Helvetica', Courier, monospace;
    color: white;
}

/* Valor da variável */
.nt-var-value {
    margin: 0;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: 'Helvetica', Courier, monospace;
    color: white;
}

.fill-bar {
    background-image: linear-gradient(to right, rgb(2,101,168), rgb(59,177,127));
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    z-index: 1;
    pointer-events: none;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.2);
}

/* Nome das variáveis */
.variable-name {
    font-weight: bold;
    color: white; /* Cor do texto */
}
  
/* Valores das variáveis */
.variable-value {
    border-radius: 10px;
    color: white;
    font-size: 1.5rem; /* Aumenta o tamanho da fonte para os valores */
    font-weight: bold; /* Deixa o valor mais destacado */
    margin: 5px 0;     /* Espaçamento vertical ao redor do valor */
}

#variaveis-navio #variaveis-navio-2 {
    display: flex;
    flex-wrap: wrap; /* Permite que os itens quebrem para a próxima linha */
    gap: 20px; /* Espaçamento entre os itens */
}

.map-block {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    text-align: center;
    text-decoration: none;
}

.map-block:hover {
    cursor: pointer;  
}

.status-indicator {
    display: flex;
    align-items: center;
    margin-left: auto; /* Empurra para a direita */
    padding-right: 15px; /* Espaçamento */
}

.status-indicator .circle-white {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

.status-indicator .circle-blue {
    width: 8px;
    height: 8px;
    background-color: rgb(59,177,127);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(212,239,238,1), inset 0 0 100px rgba(0, 0, 0, 0.2);
}

.status-indicator .text-white {
    color: white;
    font-size: 15px;
    margin-right: 5px; /* Espaço entre o texto e o círculo */
}

.status-indicator .text-blue {
    color: rgb(59,177,127);
    font-size: 15px;
    margin-right: 5px; /* Espaço entre o texto e o círculo */
}

.footer-link {
    color: white;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
    cursor: pointer;
}

.footer-custom {
    bottom: 0;
    position: fixed;
    margin-top: 2rem;
    width: 100%;
    justify-content: center;
    align-items: center;
    justify-items: center;
    text-align: center;
}

/* Mapa */
.map-container {
    position: relative; /* Para estabelecer contexto, se necessário */
    width: 100%;
    text-align: center;
    margin-top: 3rem; /* Compensar a altura da barra fixa, se necessário */
    overflow: hidden;
}

#ship-map {
    width: 100%;
    height: 20rem;
    border: 2px solid white;
    border-radius: 10px;
    margin-top: 1rem;
    z-index: 0;
}

.map-title {
    color: white;
    font-size: 1.5rem;
    text-align: center !important;
    margin-bottom: 1rem;
}
