body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

#app {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none; /* Oculta todas as telas por padrão */
    flex-direction: column;
    flex-grow: 1;
}

.screen.active {
    display: flex; /* Mostra a tela ativa */
}

header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1, header h2 {
    margin: 0;
    font-size: 1.2em;
}

header button {
    background: none;
    border: none;
    color: white;
    font-size: 1em;
    cursor: pointer;
}

#shopping-list-screen ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto; /* Permite rolagem se a lista for longa */
}

#shopping-list-screen li {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#shopping-list-screen li .item-info {
    flex-grow: 1;
    margin-right: 10px;
}

#shopping-list-screen li .item-info span {
    display: block;
    font-size: 0.9em;
    color: #666;
}

#shopping-list-screen li .item-price {
    font-weight: bold;
}

.total-section {
    padding: 15px;
    border-top: 2px solid #007bff;
    text-align: right;
    background-color: #e9ecef;
}

.total-section h2 {
    margin: 0;
}

footer {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.fab {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 2em;
    line-height: 50px; /* Centraliza o + verticalmente */
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#add-item-screen {
    padding: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: calc(100% - 22px); /* Ajusta para padding e borda */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.quantity-group {
    display: flex;
    align-items: center;
}

.quantity-group label {
    margin-right: 10px;
    margin-bottom: 0;
}

.quantity-group button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    font-size: 1.2em;
    cursor: pointer;
    margin: 0 10px;
}

.quantity-group span {
    font-size: 1.2em;
    min-width: 20px;
    text-align: center;
}

.item-total-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

#add-item-screen button#confirm-add-item-button {
    background-color: #28a745;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
}

#history-screen {
     padding: 15px;
}

button {
    cursor: pointer;
}

#finish-button {
    background-color: #dc3545;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
}



/* Camera Screen Styles */
.camera-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    position: relative; /* Needed for potential overlays */
}

#camera-view {
    max-width: 100%;
    max-height: 100%;
    width: 100%; /* Try to fill container */
    height: auto;
}

#camera-screen footer {
    justify-content: center; /* Center the capture button */
}

#capture-button {
    background-color: #dc3545;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
}



/* Add Options Buttons */
.add-options {
    display: flex;
    gap: 10px; /* Space between buttons */
}

.add-options button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%; /* Make them circular */
    width: 45px;
    height: 45px;
    font-size: 1.5em; /* Adjust icon size */
    line-height: 45px; /* Center icon vertically */
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.add-options button#open-camera-button {
    background-color: #28a745; /* Green for camera */
}

.add-options button#add-manual-button {
    background-color: #ffc107; /* Yellow for manual */
    color: #333; /* Darker icon for yellow background */
}

/* Remove or comment out old FAB style if it exists */
/* .fab { ... } */

