/**
 * cliente.css — Estilos do fluxo de pedido do cliente (index.html)
 *
 * Extraído de index.html em 11/07/2026. Ao contrário de dark-theme.css,
 * este arquivo NÃO é compartilhado com outras páginas — index.html usa
 * um tema próprio (claro, cores fixas) sem overlap real com admin/garcom/
 * entregador. O ganho aqui é só cache do navegador, já que index.html é
 * a página mais visitada do sistema (todo cliente que escaneia o QR Code).
 */

        * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
        body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f1f3f5; margin: 0; padding: 0; }

        /* ── HEADER ── */
        .header { background-color: #d9381e; color: white; padding: 16px 20px; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
        .header h1 { margin: 0; font-size: 22px; }
        .header p  { margin: 4px 0 0; font-size: 13px; opacity: 0.9; }

        /* ── BANNER DE LOJA FECHADA ── */
        .banner-fechado {
            display: none;
            background-color: #dc3545;
            color: white;
            text-align: center;
            padding: 12px 16px;
            font-weight: bold;
            font-size: 14px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        }
        .banner-fechado strong { display: block; font-size: 15px; margin-bottom: 2px; }

        /* ── LAYOUT PRINCIPAL ── */
        .container { max-width: 1000px; margin: 16px auto; padding: 0 12px; display: flex; gap: 20px; flex-wrap: wrap; }
        .cardapio-secao { flex: 2; min-width: 0; width: 100%; }
        .carrinho-secao { flex: 1; min-width: 0; width: 100%; background: white; padding: 16px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); height: fit-content; }

        /* ── CARDÁPIO ── */
        .categoria-titulo { color: #343a40; font-size: 17px; border-bottom: 2px solid #dee2e6; padding-bottom: 5px; margin-top: 20px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
        .grid-produtos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
        .produto-card { background: white; border: 1px solid #e9ecef; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 2px 5px rgba(0,0,0,0.04); }
        .produto-nome { font-weight: bold; color: #212529; font-size: 15px; margin-bottom: 4px; }
        .produto-preco { color: #28a745; font-weight: bold; font-size: 16px; margin-bottom: 12px; }
        .contador-container { display: flex; align-items: center; gap: 8px; }
        .btn-cont { background: #e9ecef; border: none; padding: 6px 14px; font-weight: bold; font-size: 18px; border-radius: 6px; cursor: pointer; color: #495057; line-height: 1; }
        .btn-cont:active { background: #ced4da; }
        .btn-cont:disabled { opacity: 0.4; cursor: not-allowed; }
        .qtd-txt { font-weight: bold; font-size: 16px; width: 24px; text-align: center; }

        /* ── CARRINHO ── */
        .carrinho-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #dee2e6; font-size: 14px; }
        .total-box { font-size: 17px; font-weight: bold; display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 2px solid #dee2e6; color: #212529; }
        .btn-checkout { background-color: #28a745; color: white; border: none; width: 100%; padding: 14px; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; margin-top: 14px; transition: 0.2s; }
        .btn-checkout:active { background-color: #218838; }
        .btn-checkout:disabled { background-color: #adb5bd; cursor: not-allowed; }
        .btn-cancel { background-color: #dc3545; color: white; border: none; width: 100%; padding: 12px; border-radius: 8px; font-size: 15px; font-weight: bold; cursor: pointer; margin-top: 10px; transition: 0.2s; }
        .btn-cancel:active { background-color: #c82333; }

        /* ── MODAIS ── */
        .modal {
            display: none;
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.55);
            justify-content: center; align-items: flex-end;
            z-index: 1000;
            padding: 0;
        }
        .modal-content {
            background: white;
            padding: 20px 16px 28px;
            border-radius: 18px 18px 0 0;
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
            box-shadow: 0 -4px 30px rgba(0,0,0,0.2);
            position: relative;
            max-height: 92dvh;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
        /* Alça de arrasto */
        .modal-content::before {
            content: '';
            display: block;
            width: 40px; height: 4px;
            background: #dee2e6;
            border-radius: 99px;
            margin: 0 auto 16px;
        }
        .modal h2 { margin-top: 0; border-bottom: 2px solid #e9ecef; padding-bottom: 10px; color: #343a40; font-size: 18px; }

        /* ── FORMULÁRIO ── */
        .form-row { display: flex; gap: 10px; }
        .form-group { display: flex; flex-direction: column; margin-bottom: 12px; flex: 1; }
        .form-group label { font-weight: bold; margin-bottom: 5px; color: #495057; font-size: 13px; }
        .form-group input,
        .form-group select {
            padding: 12px 10px;
            border: 1px solid #ced4da;
            border-radius: 8px;
            font-size: 16px; /* 16px evita zoom automático no iOS */
            width: 100%;
            appearance: none;
            -webkit-appearance: none;
        }
        .form-group input:disabled { background-color: #e9ecef; color: #6c757d; }
        .form-group input:focus { outline: none; border-color: #28a745; box-shadow: 0 0 0 2px rgba(40,167,69,0.2); }

        /* ── QR CODE ── */
        .qr-container { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 16px 0; padding: 14px; background: #f8f9fa; border-radius: 10px; }
        #qrcode { margin-bottom: 12px; }
        #qrcode img, #qrcode canvas { max-width: 100%; height: auto !important; }

        /* ── FECHAR MODAL ── */
        .btn-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 22px; cursor: pointer; color: #6c757d; padding: 4px 8px; }

        /* ── LOGO ── */
        #cliente-logo { display: none; width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; border: 3px solid rgba(255,255,255,0.4); }

        /* ── RESPONSIVO DESKTOP ── */
        @media (min-width: 640px) {
            .header h1 { font-size: 28px; }
            .container { margin: 24px auto; padding: 0 20px; }
            .cardapio-secao { min-width: 340px; }
            .carrinho-secao { min-width: 260px; }
            .grid-produtos { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
            .modal { align-items: center; padding: 20px; }
            .modal-content {
                border-radius: 14px;
                padding: 28px 28px 32px;
                max-height: 88vh;
            }
            .modal-content::before { display: none; }
        }
