/* ------------------------------
   Fonte e fundo
------------------------------ */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #2c2c2c;  /* cinza escuro */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* evita container colado no topo */
    min-height: calc(var(--vh, 1vh) * 100); /* usa altura real da viewport */
    padding: 20px 0;
    margin: 0;
    box-sizing: border-box;
}
html {
    background: #2c2c2c;
    height: 100%;
}




/* ------------------------------
   Container central
------------------------------ */
.container {
    background-color: #ffffff;
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 400px;       /* maior largura */
    max-width: 90vw;    /* evita ultrapassar a tela em mobile */
    transition: transform 0.3s ease;
    animation: slideIn 0.6s ease;
    overflow: hidden;
}


.container:hover {
    transform: translateY(-5px);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------
   Títulos
------------------------------ */
h1, h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #0077cc;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* ------------------------------
   Labels e Inputs
------------------------------ */
form label {
    display: block;
    margin-top: 6px; /* menor espaçamento */
    font-weight: 500;
    font-size: 0.95em;
}

input, select {
    width: 100%;
    padding: 6px; /* menos padding */
    margin-top: 4px; /* menor espaçamento */
    border-radius: 6px;
    border: 1px solid #ccc;
    transition: all 0.3s ease;
    font-size: 0.9em;
}


input:focus, select:focus {
    border-color: #0077cc;
    box-shadow: 0 0 8px rgba(0,119,204,0.2);
    outline: none;
}

/* ------------------------------
   Botões
------------------------------ */
button {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    border-radius: 10px;
    border: none;
    background: #28a745;
    color: #fff;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #218838;
    transform: scale(1.03);
}

/* ------------------------------
   Resultado / detalhes
------------------------------ */
#deliveryDetails {
    background: #f1f3f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    line-height: 1.5em;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

#deliveryDetails h3 {
    text-align: right;
    margin-top: 10px;
    color: #333;
}

/* ------------------------------
   Seção Nota Fiscal
------------------------------ */
.container div h2 {
    margin-top: 30px;
}

#clientNIF {
    margin-bottom: 10px;
}

/* ------------------------------
   Ajustes visuais menores
------------------------------ */
input::placeholder {
    color: #aaa;
}

select {
    cursor: pointer;
}
/* ------------------------------
   Responsividade
------------------------------ */
@media (max-width: 768px) {
    .container {
        width: 90%;   /* ocupa quase toda a tela */
        padding: 20px;
    }

    h1, h2 {
        font-size: 1.3em;
    }

    input, select, button {
        font-size: 0.9em;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;   /* ainda mais justo em celulares pequenos */
        padding: 15px;
    }

    h1, h2 {
        font-size: 1.1em;
    }

    input, select, button {
        font-size: 0.85em;
        padding: 7px;
    }
}



