/* Estilos Globais */
:root {
    --primary-color: #ea1d2c;
    --secondary-color: #3e3e3e;
    --background-color: #f8f9fa;
    --light-gray: #e9ecef;
    --medium-gray: #ced4da;
    --dark-gray: #6c757d;
    --success-color: #28a745;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--secondary-color);
    line-height: 1.6;
}

.app-container {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    height: 100vh;
    overflow: hidden;
}

/* Botões */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-danger {
    background-color: #dc3545;
    color: var(--white);
    margin-top: 10px;
    width: 100%;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Telas */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    background-color: var(--white);
}

.screen.active {
    display: flex;
}

/* Header */
.app-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 50px;
}

.back-btn, .cart-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.back-btn:hover, .cart-btn:hover {
    background-color: var(--light-gray);
}

.header-content h2 {
    flex-grow: 1;
    text-align: center;
    font-size: 1.2rem;
    margin: 0;
}

.cart-count {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 5px;
    right: 5px;
}

/* Busca e Categorias */
.search-container {
    padding: 10px 15px;
    border-bottom: 1px solid var(--light-gray);
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--light-gray);
    border-radius: 4px;
    padding: 8px 15px;
}

.search-box input {
    border: none;
    background: none;
    flex-grow: 1;
    margin-left: 10px;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
}

.categories-scroll {
    display: flex;
    overflow-x: auto;
    padding: 10px 15px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.categories-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-btn {
    white-space: nowrap;
    padding: 8px 15px;
    margin-right: 10px;
    border: none;
    border-radius: 20px;
    background-color: var(--light-gray);
    color: var(--secondary-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Conteúdo */
.content-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Login */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
}

.logo-container {
    margin-bottom: 30px;
}

.logo {
    max-width: 150px;
    height: auto;
}

.login-container h1 {
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
}

/* Seleção de Mesa */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 10px;
}

.table-item {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.table-item:hover {
    transform: translateY(-5px);
}

.table-item.occupied {
    background-color: var(--light-gray);
    color: var(--dark-gray);
}

.table-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.table-item.occupied .table-icon {
    color: var(--dark-gray);
}

/* Cardápio */
.menu-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-item {
    display: flex;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.menu-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.menu-item-details {
    flex-grow: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.menu-item-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.menu-item-description {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 10px;
    flex-grow: 1;
}

.menu-item-price {
    font-weight: 700;
    color: var(--secondary-color);
}

.menu-item-actions {
    display: flex;
    align-items: center;
    padding: 15px;
}

.add-to-cart-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    transform: scale(1.1);
}

/* Carrinho */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 15px;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--secondary-color);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.quantity-btn {
    background-color: var(--light-gray);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.quantity-value {
    margin: 0 10px;
    font-weight: 500;
}

.cart-summary {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 15px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 1px solid var(--light-gray);
    padding-top: 10px;
    margin-top: 10px;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.cart-actions .btn {
    flex: 1;
}

/* Confirmação */
.confirmation-details {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.confirmation-details h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.order-items {
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-name {
    display: flex;
    align-items: center;
}

.order-item-quantity {
    background-color: var(--light-gray);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 0.8rem;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--light-gray);
}

.confirmation-actions {
    display: flex;
    justify-content: center;
}

/* Sucesso */
.success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 20px;
}

.success-container h2 {
    margin-bottom: 10px;
    color: var(--success-color);
}

.success-container p {
    margin-bottom: 30px;
    color: var(--dark-gray);
}

.success-actions {
    margin-top: 20px;
}

/* Responsividade */
@media (min-width: 768px) {
    .app-container {
        max-width: 480px;
        border-left: 1px solid var(--light-gray);
        border-right: 1px solid var(--light-gray);
    }
}

/* Estilos para o campo de nome do cliente */
.customer-name-container {
    padding: 15px;
    margin-bottom: 10px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estilos para o modal de detalhes do produto */
.product-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.product-detail-container {
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    background-color: var(--white);
    border-radius: 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.product-detail-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 10px;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-description {
    margin-bottom: 20px;
    color: var(--dark-gray);
    line-height: 1.6;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 10px;
}

.options-list {
    margin-bottom: 20px;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
}

.option-item:last-child {
    border-bottom: none;
}

.option-name {
    display: flex;
    align-items: center;
}

.option-name input[type="checkbox"] {
    margin-right: 10px;
}

.option-price {
    color: var(--dark-gray);
}

.quantity-control {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--light-gray);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.quantity-value {
    margin: 0 15px;
    font-weight: 500;
    font-size: 1.1rem;
}

.observation-field {
    margin-bottom: 20px;
}

.observation-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.observation-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    resize: none;
    height: 80px;
}

.product-detail-actions {
    padding: 15px;
    border-top: 1px solid var(--light-gray);
}

/* Estilos para a mensagem de confirmação */
.toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    z-index: 1100;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-message.warning {
    background-color: #ffc107;
    color: #212529;
}

.toast-message .warning-icon {
    color: #dc3545;
    margin-right: 8px;
    vertical-align: middle;
}

.toast-message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
}

.toast-content .material-icons {
    margin-right: 8px;
}

.toast-content {
    display: flex;
    align-items: center;
}

.success-icon {
    color: #4CAF50;
    margin-right: 10px;
}