/* Importa a fonte Google Sans do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');

/* =============================================================
   RESET GLOBAL
   Faz todos os elementos incluírem borda e padding no cálculo
   de largura/altura, evitando estouros de layout.
   ============================================================= */
* {
    box-sizing: border-box;
}

/* =============================================================
   HTML E BODY
   Define o tamanho, fonte padrão, cor de fundo e
   a transição suave para a troca de tema.
   ============================================================= */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Impede scroll — a garrafa ocupa a tela toda */

    font-family: "Google Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "GRAD" 0;

    background-color: white;
    transition: filter 0.5s ease, background-color 0.5s ease; /* Suaviza a troca de tema */
}

/* =============================================================
   TEMA ALTERNATIVO (INVERSÃO DE CORES)
   Inverte todas as cores do body com filtro CSS.
   hue-rotate(180deg) garante que as cores fiquem naturais
   após a inversão (ex: o azul da água não vira laranja).
   ============================================================= */
body.alt-theme {
    filter: invert(100%) hue-rotate(180deg);
}

/* O menu recebe uma inversão dupla para manter suas cores originais,
   já que ele herdaria a inversão do body. */
body.alt-theme .dropdown-content {
    filter: invert(100%) hue-rotate(180deg);
}

/* =============================================================
   CONTAINER DO DROPDOWN
   Posicionamento relativo para que o menu absoluto
   se posicione corretamente dentro dele.
   ============================================================= */
.dropdown {
    position: relative;
    display: inline-block;
    float: right;  /* Empurra o menu para o canto superior direito */
    z-index: 20;   /* Fica acima de todos os outros elementos */
}

/* =============================================================
   CONTEÚDO DO MENU SUSPENSO
   Oculto por padrão. A visibilidade é controlada pelo script.js
   via menu.style.display — não pelo CSS (evita conflitos no mobile).
   ============================================================= */
.dropdown-content {
    display: none; /* Estado inicial: fechado */
    position: absolute;
    right: 10px;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10;
	
	max-height: 60vh; /* O menu ocupará no máximo 60% da altura da tela */
    overflow-y: auto;  /* Ativa o scroll apenas se houver muitos itens */
}

/* =============================================================
   BOTÃO DO MENU (ÍCONE HAMBÚRGUER)
   Remove estilos padrão do botão para parecer apenas um ícone.
   ============================================================= */
.dropbtn {
    border: none;
    background: none;
    margin: 5px;
    cursor: pointer;
}

.dropbtn svg {
    width: 70px;
    height: 70px;
}

/* =============================================================
   INPUTS E BOTÕES DENTRO DO MENU
   Estilo unificado para inputs e botões do dropdown.
   ============================================================= */
.dropdown-content input, 
.dropdown-content button {
    width: 100%;
    height: 50px;

    background-color: white;
    border: none;
    cursor: pointer;

    font-family: "Google Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "GRAD" 0;
}

.dropdown-content label {
    display: block; /* Permite que a largura e altura funcionem */
    background-color: white;
    text-align: center;
    width: 100%;
    
    /* Aumente a altura ou use padding para não ficar muito "espremido" */
    padding: 3px 0; 
    
    /* Estética para combinar com seus inputs */
    font-family: "Google Sans", sans-serif;
    font-size: 14px;
    cursor: default;
}

/* Efeito hover nos botões e no link do manual */
.dropdown-content button:hover,
.menu-link:hover {
    background-color: black;
    color: white;
    transition: background-color 0.2s ease;
}

/* =============================================================
   LINK DO MANUAL
   Estilizado para parecer um botão igual aos outros do menu,
   mantendo consistência visual mesmo sendo uma tag <a>.
   ============================================================= */
.menu-link {
    display: block;
    text-align: center;
    text-decoration: none;
    color: black;
    padding: 15px;
    background-color: white;
    font-size: 14px;
    width: 100%;
    border: none;
    font-family: "Google Sans", sans-serif;
}

/* =============================================================
   WRAPPER DOS INPUTS COM PREFIXO
   Posiciona o rótulo (Meta / Qtd.) dentro do campo de input.
   ============================================================= */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-prefix {
    position: absolute;
    left: 10px;
    font-size: 12px;
    color: #888;
    pointer-events: none; /* Cliques passam para o input */
}

/* Empurra o valor digitado para não sobrepor o prefixo */
.input-wrapper input {
    padding-left: 40px;
}

/* =============================================================
   CONTAINER DA GARRAFA
   Ocupa toda a tela e centraliza o SVG da garrafa.
   pointer-events: none garante que cliques passem através dela
   e atinjam elementos embaixo (como o menu).
   ============================================================= */
.garrafa {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1; /* Fica atrás do menu */
    pointer-events: none;
}

/* O SVG ocupa 90% da altura da tela, mantendo proporção automática */
.garrafa svg {
    width: auto;
    height: 90%;
    margin: auto;
}

/* Centraliza o texto dentro dos campos de input */
#meta-input, #ml-input {
    text-align: center;
}

/* =============================================================
   MODO PAISAGEM (LANDSCAPE)
   Quando o celular está deitado, a garrafa é rotacionada
   -90deg para aproveitar melhor o espaço horizontal.
   Os textos internos são contra-rotacionados para ficarem em pé.
   ============================================================= */
@media (orientation: landscape) {
    .garrafa svg {
        transform: rotate(-90deg);

        /* 90vw como nova "altura" da garrafa deitada */
        height: 90vw;
        width: 80vh; /* Controla a "largura" em relação à altura da tela */

        max-width: 100%;
        max-height: 100%;

        transition: all 0.5s ease;
    }
}

/* =============================================================
   REMOVE AS SETAS DOS INPUTS NUMÉRICOS
   Melhora a aparência dos campos number no Chrome e Firefox.
   ============================================================= */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}